Background Jobs
How to debug failed HTTP deliveries
Use attempt history to distinguish redirects, throttling, application errors, and timeouts before retrying a SendMQ job.
By SendMQ 2 min read
Where should you start when a job fails?
Open the job in the SendMQ console or fetch its attempts with the Jobs API. Record the job ID, the latest attempt status, and the destination’s response code or transport error. For a webhook, use the webhook delivery details to identify the affected endpoint.
Compare the first and final attempts. A job that eventually succeeded after two 503 responses tells a different story from a job that returned 400 on its first attempt. Use the attempt timestamp and job ID to find the corresponding entry in your destination logs.
curl "https://sendmq.com/v1/jobs/$JOB_ID/attempts" \
-H "Authorization: Bearer $SENDMQ_API_KEY"What does the response tell you?
A 3xx response means the handler returned a redirect. SendMQ leaves redirects unfollowed, so check that the job uses the final HTTPS path. A 400 can indicate an invalid request body. A 429 suggests that your endpoint has rejected work due to load or a rate limit. A 5xx points to a server-side error, which might come from your application or an upstream proxy.
A timeout leaves the outcome ambiguous. Compare the timestamps with your handler logs and check for a durable result or provider operation ID. Your handler may have completed its work before the connection closed.
When is a manual retry appropriate?
Once you have fixed the destination and checked for an existing business result, retry a failed or canceled job and inspect the next attempt. Confirm that the original request is still valid. If the payload must change, create a new job with the corrected payload and a new submission key.