diff --git a/app/jobs/regular/push_notification.rb b/app/jobs/regular/push_notification.rb index a01b80277e4..e07e5d59208 100644 --- a/app/jobs/regular/push_notification.rb +++ b/app/jobs/regular/push_notification.rb @@ -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