mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 03:06:31 -05:00
feat: add PasswordTooWeak error
Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
ac5e059243
commit
d7c58b9de5
2 changed files with 9 additions and 1 deletions
|
@ -66,6 +66,10 @@ const mapOfHedgeDocErrorsToHttpErrors: Map<string, HttpExceptionConstructor> =
|
|||
'NoLocalIdentityError',
|
||||
(object): HttpException => new BadRequestException(object),
|
||||
],
|
||||
[
|
||||
'PasswordTooWeakError',
|
||||
(object): HttpException => new BadRequestException(object),
|
||||
],
|
||||
]);
|
||||
|
||||
@Catch()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
||||
* SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
@ -51,3 +51,7 @@ export class InvalidCredentialsError extends Error {
|
|||
export class NoLocalIdentityError extends Error {
|
||||
name = 'NoLocalIdentityError';
|
||||
}
|
||||
|
||||
export class PasswordTooWeakError extends Error {
|
||||
name = 'PasswordTooWeakError';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue