Files
speckle-server/packages/server/modules/pwdreset/errors/index.ts
T
Iain Sproat f93d9093a0 fix(errors): all error should define an appropriate status code (#3112)
* fix(errors): all error should define a status code (default is 500)
- rename NoInviteFoundError to InviteNotFoundError to match xNotFoundError pattern

* remove unused errors
2024-09-25 13:08:13 +02:00

14 lines
504 B
TypeScript

import { BaseError } from '@/modules/shared/errors'
export class InvalidPasswordRecoveryRequestError extends BaseError {
static code = 'INVALID_PASSWORD_RECOVERY_REQUEST_ERROR'
static defaultMessage = 'Invalid password recovery request'
static statusCode = 400
}
export class PasswordRecoveryFinalizationError extends BaseError {
static code = 'PASSWORD_RECOVERY_FINALIZATION_ERROR'
static defaultMessage = 'An error occurred while finalizing the password change'
static statusCode = 400
}