Exception: Shaf::Errors::UnauthorizedError
- Inherits:
-
ServerError
- Object
- StandardError
- Shaf::Error
- ServerError
- Shaf::Errors::UnauthorizedError
- Defined in:
- lib/shaf/errors.rb
Instance Attribute Summary
Attributes inherited from ServerError
Instance Method Summary collapse
- #http_status ⇒ Object
-
#initialize(msg = nil) ⇒ UnauthorizedError
constructor
A new instance of UnauthorizedError.
Constructor Details
#initialize(msg = nil) ⇒ UnauthorizedError
Returns a new instance of UnauthorizedError.
35 36 37 38 |
# File 'lib/shaf/errors.rb', line 35 def initialize(msg = nil) msg ||= "User is not authorized" super(msg, code: "UNAUTHORIZED", title: "Unauthorized user") end |
Instance Method Details
#http_status ⇒ Object
31 32 33 |
# File 'lib/shaf/errors.rb', line 31 def http_status 401 end |