Exception: Doze::UnauthorizedError

Inherits:
ClientError show all
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

#headers, #http_status

Instance Method Summary collapse

Methods inherited from Error

#backtrace

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