@mrhsp/auth-backend
Version:
Gate Keeper Backend Authentication Package
25 lines (24 loc) • 680 B
JavaScript
export class InvalidCredentialsError extends Error {
constructor() {
super("Invalid credentials");
this.name = "InvalidCredentialsError";
}
}
export class AccountAlreadyExistsError extends Error {
constructor(id) {
super(`Account with id ${id} already exists`);
this.name = "AccountAlreadyExistsError";
}
}
export class AccountNotFoundError extends Error {
constructor(id) {
super(`Account with id ${id} not found`);
this.name = "AccountNotFoundError";
}
}
export class PasswordPolicyError extends Error {
constructor(message) {
super(message);
this.name = "PasswordPolicyError";
}
}