Skip to content

Commit

Permalink
fix(backend): pass error name in DBError meta details
Browse files Browse the repository at this point in the history
  • Loading branch information
ascariandrea committed Sep 17, 2024
1 parent d578bc5 commit f890a48
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,14 @@ export const toError =
l.error.log("An error occurred %O", e);

if (e instanceof IOError) {
return e as any;
return e as DBError;
}

if (e instanceof Error) {
return new DBError(e.message, {
kind: "ServerError",
status: (override?.status ?? 500) + "",
meta: [e.stack],
meta: [e.name, e.stack],
});
}

Expand Down

0 comments on commit f890a48

Please sign in to comment.