Skip to content

Commit

Permalink
fix(backend): return 500 status for NERError
Browse files Browse the repository at this point in the history
  • Loading branch information
ascariandrea committed Apr 19, 2024
1 parent 7cb01d1 commit 8b6c3a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@liexp/backend/src/providers/ner/ner.provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ export const toError =
if (e instanceof Error) {
return new NERError(e.message, {
kind: "ServerError",
status: (override?.status ?? 401) + "",
status: (override?.status ?? 500) + "",
meta: e.stack,
});
}

return new NERError("An error occurred", {
status: (override?.status ?? 401) + "",
status: (override?.status ?? 500) + "",
kind: "ServerError",
meta: [String(e)],
});
Expand Down

0 comments on commit 8b6c3a9

Please sign in to comment.