fix: map PermissionError to HTTP Forbidden

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2022-09-11 18:10:05 +02:00 committed by Yannick Bungers
parent 4271ef740c
commit ada90ed30b

View file

@ -38,7 +38,7 @@ const mapOfHedgeDocErrorsToHttpErrors: Map<string, HttpExceptionConstructor> =
['ClientError', (object): HttpException => new BadRequestException(object)],
[
'PermissionError',
(object): HttpException => new UnauthorizedException(object),
(object): HttpException => new ForbiddenException(object),
],
[
'TokenNotValidError',