Exception: Apia::RuntimeError

Inherits:
StandardError show all
Defined in:
lib/apia/errors/runtime_error.rb

Overview

Runtime errors occurr during API requests because they could not be detected before an action is processed.

Instance Method Summary collapse

Instance Method Details

#hashHash

Return the hash that describes this error

Returns:

  • (Hash)


19
20
21
22
23
24
25
26
27
# File 'lib/apia/errors/runtime_error.rb', line 19

def hash
  {
    code: 'generic_runtime_error',
    description: message,
    detail: {
      class: self.class.name
    }
  }
end

#http_statusInteger

Return the default HTTP status code that should be returned when this error is encoutered over HTTP

Returns:

  • (Integer)


12
13
14
# File 'lib/apia/errors/runtime_error.rb', line 12

def http_status
  400
end