mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
24 lines
603 B
TypeScript
24 lines
603 B
TypeScript
export default class PasswordUndefinedError extends Error {
|
|
constructor() {
|
|
super();
|
|
Error.captureStackTrace(this, this.constructor);
|
|
|
|
this.name = this.constructor.name;
|
|
this.message = 'Password cannot be empty or undefined';
|
|
}
|
|
|
|
toJSON(): any {
|
|
const obj = {
|
|
isJoi: true,
|
|
name: this.constructor.name,
|
|
details: [
|
|
{
|
|
validationErrors: [],
|
|
message: 'Password cannot be empty or undefined',
|
|
},
|
|
],
|
|
};
|
|
return obj;
|
|
}
|
|
}
|