Updates
This commit is contained in:
@@ -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