UNPKG

@atproto/oauth-scopes

Version:

A library for manipulating and validating ATproto OAuth scopes in TypeScript.

15 lines • 496 B
export class ScopeMissingError extends Error { get statusCode() { return this.status; } constructor(scope) { super(`Missing required scope "${scope}"`); this.scope = scope; this.name = 'ScopeMissingError'; // compatibility layer with http-errors package. The goal if to make // isHttpError(new ScopeMissingError) return true. this.status = 403; this.expose = true; } } //# sourceMappingURL=scope-missing-error.js.map