Updates
This commit is contained in:
@@ -74,7 +74,7 @@ export default async function apiPost({
|
||||
|
||||
results = result;
|
||||
|
||||
if (error) throw error;
|
||||
if (error) throw new Error(error);
|
||||
|
||||
let tableSchema:
|
||||
| import("../../../types").DSQL_TableSchemaType
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user