FIX: log when push notifications fail
This commit is contained in:
parent
16d356ab4e
commit
5c89a37ceb
|
@ -20,10 +20,15 @@ module Jobs
|
|||
})
|
||||
end
|
||||
|
||||
Excon.post(push_url,
|
||||
result = Excon.post(push_url,
|
||||
body: payload.merge(notifications: notifications).to_json,
|
||||
headers: { 'Content-Type' => 'application/json', 'Accept' => 'application/json' }
|
||||
)
|
||||
|
||||
if result.status != 200
|
||||
# we failed to push a notification ... log it
|
||||
Rails.logger.warn("Failed to push a notification to #{push_url} Status: #{result.status}: #{result.status_line}")
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue