From abf6addb704421e9f9aec09691e69bc9f9dd413f Mon Sep 17 00:00:00 2001 From: Benny Samir Hierl Date: Sat, 5 Feb 2022 09:56:15 +0100 Subject: [PATCH] #1 http status changed for case not unique slug text Signed-off-by: Benny Samir Hierl --- src/api/config/errors/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/config/errors/index.ts b/src/api/config/errors/index.ts index a3d14a2..99bacf3 100644 --- a/src/api/config/errors/index.ts +++ b/src/api/config/errors/index.ts @@ -11,5 +11,5 @@ class httpError extends Error { } export const uniqueKeyError = (msg: string, code = '4001') => { - return new httpError(msg, 400, code) + return new httpError(msg, 422, code) }