Exception: Cxf::Errors::DynamicError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/errors.rb

Constant Summary collapse

ERRORS =
{
  '401' => 'AccessDeniedException',
  '404' => 'ResourceNotFoundException',
  '422' => 'ValidationException',
  '405' => 'MethodNotAllowedException',
  'undefined_id' => 'UndefinedIdException',
  'default' => 'InternalServerException',
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client, title, detail, http_status, response) ⇒ DynamicError

Returns a new instance of DynamicError.



19
20
21
22
# File 'lib/errors.rb', line 19

def initialize(client, title, detail, http_status, response)
  @http_status = http_status
  @error = error_class.constantize&.new(client, title, detail, http_status, response)
end

Instance Attribute Details

#errorObject (readonly)

Returns the value of attribute error.



24
25
26
# File 'lib/errors.rb', line 24

def error
  @error
end

#http_statusObject (readonly)

Returns the value of attribute http_status.



24
25
26
# File 'lib/errors.rb', line 24

def http_status
  @http_status
end

Instance Method Details

#to_sObject



26
27
28
# File 'lib/errors.rb', line 26

def to_s
  error_class
end