Class: AthenaHealth::Error
- Inherits:
-
Object
- Object
- AthenaHealth::Error
- Defined in:
- lib/athena_health/error.rb
Constant Summary collapse
- ERROR_TYPES =
{ 401 => , 402 => IncorrectPermissionsError, 403 => ForbiddenError, 404 => NotFoundError, 500 => InternalServerError, 503 => ServiceUnavailableError, }
Instance Method Summary collapse
-
#initialize(code:) ⇒ Error
constructor
A new instance of Error.
- #render ⇒ Object
Constructor Details
#initialize(code:) ⇒ Error
Returns a new instance of Error.
28 29 30 |
# File 'lib/athena_health/error.rb', line 28 def initialize(code:) @code = code end |
Instance Method Details
#render ⇒ Object
32 33 34 |
# File 'lib/athena_health/error.rb', line 32 def render fail ERROR_TYPES[@code] end |