This commit is contained in:
Louis Lam
2023-12-24 22:01:17 +08:00
parent 37f261480a
commit 7d91c8d037
9 changed files with 153 additions and 14 deletions

View File

@@ -60,12 +60,14 @@ export function callbackError(error : unknown, callback : unknown) {
callback({
ok: false,
msg: error.message,
msgi18n: true,
});
} else if (error instanceof ValidationError) {
callback({
ok: false,
type: ERROR_TYPE_VALIDATION,
msg: error.message,
msgi18n: true,
});
} else {
log.debug("console", "Unknown error: " + error);