Exception: Doze::UnauthorizedError
- Inherits:
-
ClientError
- Object
- StandardError
- Error
- ClientError
- Doze::UnauthorizedError
- Defined in:
- lib/doze/error.rb
Overview
Can be used if you want to deny an action, but you couldn’t do it at the time of routing (which you could have done with Router#authorize_routing) or if you want to include an error reason with the response
Instance Attribute Summary
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(reason = 'unauthorized') ⇒ UnauthorizedError
constructor
A new instance of UnauthorizedError.
Methods inherited from Error
Constructor Details
#initialize(reason = 'unauthorized') ⇒ UnauthorizedError
Returns a new instance of UnauthorizedError.
51 52 53 |
# File 'lib/doze/error.rb', line 51 def initialize(reason='unauthorized') super(Doze::Utils::STATUS_UNAUTHORIZED, reason) end |