From ada90ed30bc851ee2c7175fee2caac033eb05711 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Sun, 11 Sep 2022 18:10:05 +0200 Subject: [PATCH] fix: map PermissionError to HTTP Forbidden Signed-off-by: David Mehren --- backend/src/errors/error-mapping.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/errors/error-mapping.ts b/backend/src/errors/error-mapping.ts index 0a31e1ff4..6672a2c0c 100644 --- a/backend/src/errors/error-mapping.ts +++ b/backend/src/errors/error-mapping.ts @@ -38,7 +38,7 @@ const mapOfHedgeDocErrorsToHttpErrors: Map = ['ClientError', (object): HttpException => new BadRequestException(object)], [ 'PermissionError', - (object): HttpException => new UnauthorizedException(object), + (object): HttpException => new ForbiddenException(object), ], [ 'TokenNotValidError',