From 8b6c3a903365a0dcde25844acd29a612e6e1cfdb Mon Sep 17 00:00:00 2001 From: ascariandrea Date: Fri, 19 Apr 2024 17:26:45 +0200 Subject: [PATCH] fix(backend): return 500 status for NERError --- packages/@liexp/backend/src/providers/ner/ner.provider.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/@liexp/backend/src/providers/ner/ner.provider.ts b/packages/@liexp/backend/src/providers/ner/ner.provider.ts index bbc6df1488..ae1273401f 100644 --- a/packages/@liexp/backend/src/providers/ner/ner.provider.ts +++ b/packages/@liexp/backend/src/providers/ner/ner.provider.ts @@ -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)], });