Commit 6eb9e981 authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Improved changelog entry, also changed error message for HTTParty error

parent 64e81195
---
title: Added rescue block for the test method
title: Prevent 500 errors caused by testing the Prometheus service
merge_request: 10994
author:
......@@ -55,7 +55,7 @@ module Gitlab
rescue OpenSSL::SSL::SSLError
raise PrometheusError, "#{url} contains invalid SSL data"
rescue HTTParty::Error
raise PrometheusError, "An error has ocurred"
raise PrometheusError, "Network connection error"
end
def handle_response(response)
......
......@@ -73,7 +73,7 @@ describe Gitlab::Prometheus, lib: true do
req_stub = stub_prometheus_request_with_exception(prometheus_url, HTTParty::Error)
expect { subject.send(:get, prometheus_url) }
.to raise_error(Gitlab::PrometheusError, "An error has ocurred")
.to raise_error(Gitlab::PrometheusError, "Network connection error")
expect(req_stub).to have_been_requested
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment