Commit 3d5c81d8 authored by Lobster's avatar Lobster
Browse files

Fix API errors feedback

parent 8d65eb0e
......@@ -144,10 +144,9 @@ class NotificationHook < Redmine::Hook::Listener
req.add_field('User-Agent', 'ZulipRedmine/0.1')
req.set_form_data(data)
begin
http.request(req)
rescue Net::HTTPBadResponse => e
Rails.logger.error "Error while POSTing to Zulip: #{e}"
res = http.request(req)
unless res.code == "200"
Rails.logger.error "Error while POSTing to Zulip: #{res.body}"
end
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment