This commit is contained in:
Benjamin Toby
2025-04-23 14:45:44 +01:00
parent e7b7cf0314
commit c71c1c29ca
6 changed files with 13 additions and 7 deletions
+4 -2
View File
@@ -6,7 +6,7 @@ type QueryObject = {
values?: (string | number | undefined)[];
};
type Return<ReturnType = any> = ReturnType | null;
type Return<ReturnType = any> = ReturnType | null | { error: string };
/**
* # Run Query From MySQL Connection
@@ -96,7 +96,9 @@ export default async function connDbHandler<ReturnType = any>(
});
}
return null;
return {
error: `Connection DB Handler Error: ${error.message}`,
};
} finally {
conn?.end();
}