lib/prometheus/api_client/client.rb in prometheus-api-client-0.6.0 vs lib/prometheus/api_client/client.rb in prometheus-api-client-0.6.1
- old
+ new
@@ -100,11 +100,11 @@
# response JSON.
def run_command(command, options)
response = get(command, options)
JSON.parse(response.body)['data']
- rescue
- raise RequestError, 'Bad response from server'
+ rescue StandardError => err
+ raise RequestError, err.message
end
# Helper function to evalueate the low level proxy option
def faraday_proxy(options)
return options[:proxy] if options[:proxy]