Skip to content

Handle `Net::HTTPBadResponse` in `Gitlab::HTTP`

What does this MR do and why?

This merge request adds Net::HTTPBadResponse to Gitlab::HTTP::HTTP_ERRORS. The list is frequently used to handle any HTTP exception that can be raised through that class.

We see some of these exceptions on occasion being raised by WebHookService, specifically raised by code added in 6a84084 which is a patch of ruby/ruby code which defines the error. Bundler also treats this error in a similar way.

https://sentry.gitlab.net/gitlab/gitlabcom/?query=is%3Aunresolved+%22Net%3A%3AHTTPBadResponse%22

Handling within Gitlab::HTTP will mean the service will successfully disable failing web hooks.

Other classes that refer to HTTP_ERRORS for their HTTP exception handling will also benefit.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #385858 (closed)

Edited by Luke Duncalfe

Merge request reports

Loading