Skip to content
Snippets Groups Projects
Commit 13b673c6 authored by Bojan Marjanovic's avatar Bojan Marjanovic :five:
Browse files

Add default standard code for Jira exceptions

Since Jira catches some `Gitlab::HTTP` errors
without code values, we return a default value of 400.

Changelog: fixed
parent 96b044fb
No related branches found
No related tags found
1 merge request!121630Fix NoMethodError: undefined method `code` bug
......@@ -631,7 +631,7 @@ def jira_request(path)
yield
rescue StandardError => e
@error = e
log_exception(e, message: 'Error sending message', client_url: client_url, client_path: path, client_status: e.code)
log_exception(e, message: 'Error sending message', client_url: client_url, client_path: path, client_status: e.try(:code))
nil
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment