Files
lib/src/auth/NotAuthorizedError.ts
garrettmills f00233d49a
All checks were successful
continuous-integration/drone/push Build is passing
Add middleware and logic for bootstrapping the session auth
2021-06-05 13:24:12 -05:00

12 lines
327 B
TypeScript

import {HTTPError} from '../http/HTTPError'
import {HTTPStatus} from '../util'
/**
* Error thrown when a user attempts an action that they are not authorized to perform.
*/
export class NotAuthorizedError extends HTTPError {
constructor(message = 'Not Authorized') {
super(HTTPStatus.FORBIDDEN, message)
}
}