Skip to content

Commit f890a48

Browse files
committed
fix(backend): pass error name in DBError meta details
1 parent d578bc5 commit f890a48

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/@liexp/backend/src/providers/orm/database.provider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,14 @@ export const toError =
100100
l.error.log("An error occurred %O", e);
101101

102102
if (e instanceof IOError) {
103-
return e as any;
103+
return e as DBError;
104104
}
105105

106106
if (e instanceof Error) {
107107
return new DBError(e.message, {
108108
kind: "ServerError",
109109
status: (override?.status ?? 500) + "",
110-
meta: [e.stack],
110+
meta: [e.name, e.stack],
111111
});
112112
}
113113

0 commit comments

Comments
 (0)