unleash-server
Version:
Unleash is an enterprise ready feature flag service. It provides different strategies for handling feature flags.
22 lines • 723 B
JavaScript
import { UnleashError } from '../error/unleash-error.js';
export class AuthenticationRequired extends UnleashError {
constructor({ type, path, message, options, defaultHidden = false, }) {
super(message);
this.statusCode = 401;
this.type = type;
this.path = path;
this.options = options;
this.defaultHidden = defaultHidden;
}
toJSON() {
return {
...super.toJSON(),
path: this.path,
type: this.type,
defaultHidden: this.defaultHidden,
...(this.options ? { options: this.options } : {}),
};
}
}
export default AuthenticationRequired;
//# sourceMappingURL=authentication-required.js.map