Skip to content

Commit

Permalink
Update request_client.rb
Browse files Browse the repository at this point in the history
To improve the error handling I suggest this change.
In my case I just got "request_client.rb:16:in `request': Bad Request (JIRA::HTTPError)" with the existing code.
  • Loading branch information
cfritschi authored Jul 15, 2021
1 parent 61c6705 commit db59668
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/jira/request_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def request(*args)

def request_multipart(*args)
response = make_multipart_request(*args)
raise HTTPError, response unless response.is_a?(Net::HTTPSuccess)
raise HttpError.new(response.code, response.message), response unless response.is_a?(Net::HTTPSuccess)
response
end

Expand All @@ -28,4 +28,4 @@ def make_multipart_request(*args)
raise NotImplementedError
end
end
end
end

0 comments on commit db59668

Please sign in to comment.