backport: log failed bin/sim_job HTTP reqs

Phillip Davis created

Change summary

bin/sim_job | 5 +++++
1 file changed, 5 insertions(+)

Detailed changes

bin/sim_job 🔗

@@ -277,6 +277,11 @@ EM.run do
 
 		if e.is_a?(::Exception)
 			Sentry.capture_exception(e)
+		elsif e.is_a?(EM::HttpClient)
+			LOG.error e.response_header
+			Sentry.capture_message(
+				"HTTP Error: #{e.response_header.http_status} @ #{e.last_effective_url}"
+			)
 		else
 			Sentry.capture_message(e.to_s)
 		end