Method: Restforce::Middleware::Authentication#error_message

Defined in:
lib/restforce/middleware/authentication.rb

#error_message(response) ⇒ Object

Internal: The parsed error response.



67
68
69
70
71
72
# File 'lib/restforce/middleware/authentication.rb', line 67

def error_message(response)
  return response.status.to_s unless response.body

  "#{response.body['error']}: #{response.body['error_description']} " \
    "(#{response.status})"
end