1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-11-01 19:07:38 +01:00
unleash.unleash/src/lib/error/password-mismatch.ts
Ivar Conradi Østhus a50d0e2a21
fix: improve API error-handling (#1301)
Unleash is an API and it would simplyfy a lot of the specific
errors could carry the expected HTTP status code for this error.
This would eliminate the need for a gigantic switch/case in the
handle-errors function.
2022-01-26 13:45:22 +01:00

11 lines
296 B
TypeScript

import BaseError from './base-error';
class PasswordMismatch extends BaseError {
constructor(message: string = 'Wrong password, try again.') {
super(message, 401, 'PasswordMismatch');
Error.captureStackTrace(this, this.constructor);
}
}
export default PasswordMismatch;