Commit graph

7 commits

Author SHA1 Message Date
David Wilkins
467a411e88 Convert RestClient to Gitlab::HTTP for Prometheus Monitor
- Closes #60024

- Change PrometheusClient.new to accept a base url instead of an
  already created RestClient

- Use Gitlab::HTTP in PrometheusClient instead of creating RestClient
  in PrometheusService

- Move http_options from PrometheusService to
  PrometheusClient (follow_redirects: false)

- ensure that base urls don't have the trailing slash

- Created a `PrometheusClient#url` method that might not be strictly
  required

- Change rescued exceptions from RestClient::* to
  HTTParty::ResponseError where possible and StandardError for the
  rest
2019-08-07 02:42:20 +00:00
Peter Leitzen
bbb17ea1ea Handle possible HTTP exception for Sentry client
Prior this commit exceptions raised during a HTTP request
weren't caught by the Sentry client and were passed to the user.

In addition the Sentry client tried to catch a non-existent error
`Sentry::Client::SentryError`.

Now, the Sentry client catches all possible errors coming from
a HTTP request.
2019-04-07 07:51:36 +00:00
Reuben Pereira
c558d72b5b Handle missing keys in sentry api response
- Do not raise error when there are missing non-essential keys in sentry
api response.
- Add specs for to check for missing keys behavior.
2019-03-29 14:53:40 +00:00
Dmitriy Zaporozhets
6af99db01b
Bump httparty to version 1.16.4
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2019-03-19 19:00:44 +02:00
Reuben Pereira
536463295c Catch exception in calculate reactive cache
Return the exception as an error.
2019-02-21 11:19:51 +00:00
Reuben Pereira
5841a7d5ef Update Sentry client to get project list 2019-01-31 10:05:29 +00:00
Reuben Pereira
d69074fc72 Service for calling Sentry issues api 2019-01-09 21:04:27 +00:00