OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Use faraday error wrappers.
Pavel Balashov0c2021fabaa7
diff --git a/app/services/oauth_clients/connection_manager.rb b/app/services/oauth_clients/connection_manager.rbindex dc05af51fb2..96e8dd16f0e 100644--- a/app/services/oauth_clients/connection_manager.rb+++ b/app/services/oauth_clients/connection_manager.rb@@ -203,9 +203,7 @@ module OAuthClientsServiceResult.success(result: rack_access_token)rescue Rack::OAuth2::Client::Error, Faraday::ParsingError => eservice_result_with_error(i18n_rack_oauth2_error_message(e), e.message)- rescue Timeout::Error, EOFError, Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError,- Errno::EINVAL, Errno::ENETUNREACH, Errno::ECONNRESET, Errno::ECONNREFUSED, JSON::ParserError,- Faraday::ConnectionFailed => e+ rescue Faraday::TimeoutError, Faraday::ConnectionFailed => e# Reduce the number of exceptions in the list https://github.com/lostisland/faraday-net_http/blob/main/lib/faraday/adapter/net_http.rbservice_result_with_error("#{I18n.t('oauth_client.errors.oauth_returned_http_error')}: #{e.class}: #{e.message.to_html}"