Class: ErrorResponse

Inherits:
Settingslogic
  • Object
show all
Defined in:
lib/error_response.rb

Instance Method Summary collapse

Instance Method Details

#api_format(key) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/error_response.rb', line 5

def api_format(key)
  error_data = send(key)
  status = fetch_status(error_data['error_code'])
  {
    status: status,
    json: error_data
  }
end