update database error messages
This commit is contained in:
parent
f89483f878
commit
f245ff74a8
72 changed files with 325 additions and 441 deletions
8
src/exceptions/databaseActionException.ts
Normal file
8
src/exceptions/databaseActionException.ts
Normal file
|
@ -0,0 +1,8 @@
|
|||
import CustomRequestException from "./customRequestException";
|
||||
|
||||
export default class DatabaseActionException extends CustomRequestException {
|
||||
constructor(action: string, table: string, err: any) {
|
||||
let errstring = `${action} on ${table} with ${err?.code ?? "XX"} at ${err?.sqlMessage ?? "XX"}`;
|
||||
super(500, errstring, err);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue