enhancement(auth): better error message handling

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
Erik Michelson 2023-03-25 18:58:48 +01:00
parent 8e57188ab5
commit ca9836d691
37 changed files with 199 additions and 207 deletions

View file

@ -77,7 +77,7 @@ const mapOfHedgeDocErrorsToHttpErrors: Map<string, HttpExceptionConstructor> =
(object): HttpException => new PayloadTooLargeException(object),
],
[
'RegistrationDisabledError',
'FeatureDisabledError',
(object): HttpException => new ForbiddenException(object),
],
]);

View file

@ -60,6 +60,6 @@ export class MaximumDocumentLengthExceededError extends Error {
name = 'MaximumDocumentLengthExceededError';
}
export class RegistrationDisabledError extends Error {
name = 'RegistrationDisabledError';
export class FeatureDisabledError extends Error {
name = 'FeatureDisabledError';
}