svelte-guardian
Version:
Batteries included authentication for SvelteKit applications.
23 lines (22 loc) • 649 B
JavaScript
import { AuthError, CredentialsSignin } from '@auth/core/errors';
export { AuthError, CredentialsSignin };
export class AuthenticationError extends CredentialsSignin {
constructor(message, code = 'authentication_error') {
super(message);
this.name = 'AuthenticationError';
this.code = code;
this.message = message;
}
}
export class RegistrationError extends AuthError {
constructor(message) {
super(message);
this.name = 'RegistrationError';
}
}
export class ConfigError extends AuthError {
constructor(message) {
super(message);
this.name = 'ConfigError';
}
}