mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-14 07:04:45 -04:00
enhancement(auth): better error message handling
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
parent
8e57188ab5
commit
ca9836d691
37 changed files with 199 additions and 207 deletions
|
@ -77,7 +77,7 @@ const mapOfHedgeDocErrorsToHttpErrors: Map<string, HttpExceptionConstructor> =
|
|||
(object): HttpException => new PayloadTooLargeException(object),
|
||||
],
|
||||
[
|
||||
'RegistrationDisabledError',
|
||||
'FeatureDisabledError',
|
||||
(object): HttpException => new ForbiddenException(object),
|
||||
],
|
||||
]);
|
||||
|
|
|
@ -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';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue