Exception: PayrollHero::Api::Errors::ServerReturnedError
- Inherits:
-
GenericError
- Object
- StandardError
- GenericError
- PayrollHero::Api::Errors::ServerReturnedError
- Defined in:
- lib/payroll_hero/api/errors.rb
Direct Known Subclasses
BadRequest, Forbidden, InternalServerError, MethodNotAllowed, NotAcceptable, NotFound, Unauthorized, UnexpectedResponse, UnprocessableEntity
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#error_details ⇒ Object
readonly
Returns the value of attribute error_details.
Instance Method Summary collapse
-
#initialize(code, message) ⇒ ServerReturnedError
constructor
A new instance of ServerReturnedError.
Constructor Details
#initialize(code, message) ⇒ ServerReturnedError
Returns a new instance of ServerReturnedError.
10 11 12 13 14 |
# File 'lib/payroll_hero/api/errors.rb', line 10 def initialize(code, ) @code = code @error_details = super("#{code}: #{}") end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
16 17 18 |
# File 'lib/payroll_hero/api/errors.rb', line 16 def code @code end |
#error_details ⇒ Object (readonly)
Returns the value of attribute error_details.
16 17 18 |
# File 'lib/payroll_hero/api/errors.rb', line 16 def error_details @error_details end |