1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-03-04 00:18:40 +01:00
unleash.unleash/src/lib/error/password-undefined.ts
Thomas Heartman f518b12b07
chore!: [v6] remove error.description in error messages ()
In preparation for v6, this PR removes usage and references to
`error.description` instead favoring `error.message` (as mentioned
)

I found no references in the front end, so this might be (I believe it
to be) all the required changes.
2024-05-27 11:26:19 +02:00

22 lines
501 B
TypeScript

import { type ApiErrorSchema, UnleashError } from './unleash-error';
export default class PasswordUndefinedError extends UnleashError {
statusCode = 400;
constructor() {
super('Password cannot be empty or undefined');
}
toJSON(): ApiErrorSchema {
return {
...super.toJSON(),
details: [
{
validationErrors: [],
message: this.message,
},
],
};
}
}