UNPKG

@authress/sdk

Version:

Client SDK for Authress authorization as a service. Provides managed authorization api to secure service resources including user data.

19 lines (17 loc) 471 B
/** * * @export * @class UnauthorizedError * @extends {Error} */ class UnauthorizedError extends Error { constructor(userId, resourceUri, permission) { super(`User=${userId} does not have permission=${permission} to resourceUri=${resourceUri}.`); this.userId = userId; this.resourceUri = resourceUri; this.permission = permission; this.name = 'UnauthorizedError'; this.code = 'UnauthorizedError'; } } module.exports = UnauthorizedError;