@wristband/express-auth
Version:
SDK for integrating your ExpressJS application with Wristband. Handles user authentication and token management.
21 lines (20 loc) • 553 B
JavaScript
/* eslint-disable max-classes-per-file */
export class WristbandError extends Error {
constructor(error, errorDescription) {
super(error);
this.name = 'WristbandError';
this.error = error;
this.errorDescription = errorDescription;
}
getError() {
return this.error;
}
getErrorDescription() {
return this.errorDescription;
}
}
export class InvalidGrantError extends WristbandError {
constructor(errorDescription) {
super('invalid_grant', errorDescription || '');
}
}