Make sure we didn't blow up if URI is invalid

This commit is contained in:
Lin Jen-Shin 2017-09-28 21:49:37 +08:00
parent e9060da6f0
commit 87328fa978
1 changed files with 2 additions and 0 deletions

View File

@ -64,6 +64,8 @@ module Gitlab
url.password = password if password.present?
url.user = user if user.present?
url
rescue Addressable::URI::InvalidURIError
Addressable::URI.new
end
def generate_full_url