Recuro.

HTTP Status Code

Quick Summary — TL;DR

  • An HTTP status code is a 3-digit number indicating whether a request succeeded (2xx), was rejected (4xx), or failed on the server (5xx).
  • For background jobs: 2xx means success, most 4xx errors are permanent (don't retry), and 5xx/408/429 are transient (retry with backoff).
  • A 429 (Too Many Requests) means you hit a rate limit — always respect the Retry-After header before retrying.

An HTTP status code is a three-digit number returned by a server in response to an HTTP request. It tells the client what happened: did the request succeed, did the client make an error, or did the server fail? For background jobs and webhooks, status codes determine whether a job is marked as successful, failed, or needs a retry.

The five categories

Range Category Meaning
1xxInformationalRequest received, processing continues
2xxSuccessRequest was successful
3xxRedirectionFurther action needed (follow a redirect)
4xxClient errorThe request was malformed or unauthorized
5xxServer errorThe server failed to process a valid request

Codes that matter for background jobs

Success codes (don't retry)

Code Meaning Context
200OKThe most common success response
201CreatedA resource was created (e.g., after a POST)
202AcceptedThe server accepted the request for async processing
204No ContentSuccess, but no response body

Client errors (don't retry — fix the request)

Code Meaning Action
400Bad RequestThe payload is malformed — fix the data
401UnauthorizedMissing or invalid authentication
403ForbiddenAuthenticated but not authorized
404Not FoundThe endpoint doesn't exist — check the URL
422Unprocessable EntityValidation failed — fix the payload

Retryable errors (use exponential backoff)

Code Meaning Why retry
408Request TimeoutServer didn't respond in time — may work on retry (see also webhook timeout)
429Too Many RequestsRate limited — back off and try later
500Internal Server ErrorServer-side bug or transient failure
502Bad GatewayUpstream server is down — often transient
503Service UnavailableServer overloaded or in maintenance
504Gateway TimeoutUpstream server didn't respond — similar to timeout

The 429 special case

A 429 response means you've exceeded the API's rate limit. Many APIs include a Retry-After header that tells you exactly how long to wait. Always respect this header — retrying sooner will just get another 429.

How schedulers use status codes

An HTTP job scheduler like Recuro checks the status code after every execution:

FAQ

What HTTP status code means success?

Any 2xx code means success. The most common is 200 (OK). For background jobs and webhooks, returning 200 or 204 tells the scheduler that the job was handled successfully.

Should I retry a 500 error?

Yes. A 500 Internal Server Error is usually transient — a deployment in progress, a temporary database issue, or an unhandled edge case. Retry with exponential backoff. If it persists after all retries, the job moves to the dead letter queue.

What does 429 Too Many Requests mean?

You've hit the API's rate limit. Wait for the duration specified in the Retry-After header, then try again.

Status codes drive the retry policy for background jobs. Retryable codes trigger exponential backoff, while permanent failures go to the dead letter queue. In systems with at-least-once delivery, a retryable status code means the job may execute more than once — making idempotency essential. A circuit breaker can prevent repeated calls when an endpoint consistently returns errors.

Stop managing infrastructure. Start scheduling jobs.

Recuro handles cron scheduling, retries, alerts, and execution logs -- so you can focus on building your product.

No credit card required