Sign in or sign up before continuing. Don't have an account yet? Register now to get started.
Register now

Handle error when passing an invalid URL to Jira integration

Summary

Gitlab throws a "Something went wrong at our end" with the following 500 error when entering a Jira API URL with a trailing slash and saving at the project level:

NoMethodError (undefined method `scheme' for nil:NilClass):

lib/gitlab/http.rb:24:in `perform_request'
lib/gitlab/jira/http_client.rb:39:in `public_send'
lib/gitlab/jira/http_client.rb:39:in `make_request'
lib/gitlab/jira/http_client.rb:13:in `request'

Looks related to 4e4acc94 where we changed the library from net::http to gitlab::http.

Proposal

Invalid URLs are common and should throw an "Invalid URL" error to the user.

Customer issue: https://gitlab.zendesk.com/agent/tickets/131306 (Internal use only)

Edited Sep 09, 2019 by Adam Mulvany
Assignee Loading
Time tracking Loading