Skip to content

Commit a510b3b

Browse files
authored
Merge pull request #11 from moolitayer/change_error_handling
Change error handling
2 parents 2497db0 + 4dc4f0b commit a510b3b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/prometheus/api_client/client.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ def run_command(command, options)
102102
response = get(command, options)
103103

104104
JSON.parse(response.body)['data']
105-
rescue
106-
raise RequestError, 'Bad response from server'
105+
rescue StandardError => err
106+
raise RequestError, err.message
107107
end
108108

109109
# Helper function to evalueate the low level proxy option

0 commit comments

Comments
 (0)