class Restforce::Middleware::Authentication
Public Instance Methods
error_message(response)
click to toggle source
Internal: Get an error message for the passed response. Overrides the default behavior of the middleware to correctly handle broken responses from Faraday.
Returns a String.
# File lib/restforce/extensions.rb, line 11 def error_message(response) if response.status == 0 "Request was closed prematurely" else "#{response.body['error']}: #{response.body['error_description']}" end end