Exception: Cxf::Errors::DynamicError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Cxf::Errors::DynamicError
- 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
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#http_status ⇒ Object
readonly
Returns the value of attribute http_status.
Instance Method Summary collapse
-
#initialize(client, title, detail, http_status, response) ⇒ DynamicError
constructor
A new instance of DynamicError.
- #to_s ⇒ Object
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
#error ⇒ Object (readonly)
Returns the value of attribute error.
24 25 26 |
# File 'lib/errors.rb', line 24 def error @error end |
#http_status ⇒ Object (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_s ⇒ Object
26 27 28 |
# File 'lib/errors.rb', line 26 def to_s error_class end |