Exception: EML::REST::ForbiddenError

Inherits:
EML::RESTError show all
Defined in:
lib/eml/error/rest/forbidden.rb

Instance Attribute Summary

Attributes inherited from Error

#message

Instance Method Summary collapse

Methods inherited from EML::RESTError

#http_body, #http_headers, #http_status, #url

Constructor Details

#initialize(message = nil, response = nil) ⇒ ForbiddenError

Returns a new instance of ForbiddenError.



13
14
15
16
17
# File 'lib/eml/error/rest/forbidden.rb', line 13

def initialize(message = nil, response = nil)
  message ||= response&.body&.fetch("message", nil)
  message ||= "The user is not authorised to perform the action"
  super(message, response)
end