HTTPError.net

The fastest way to diagnose, understand, and fix any HTTP status code

202 Accepted

Fault: Neither
TL;DR

Request accepted but processing will complete asynchronously.

The request has been accepted for processing, but processing has not been completed.

What HTTP 202 Accepted Means

The request has been accepted for processing, but processing has not been completed.

Request accepted but processing will complete asynchronously.

Common Causes

How to Fix It (For Visitors)

How to Fix It (For Developers/Admins)

Returning a 202 Accepted (Code Examples)

If you build APIs or web apps, here is how to send an HTTP 202 response and how to test for it:

Node.js (Express)

app.get('/resource', (req, res) => {
  res.status(202).json({ error: 'Accepted' });
});

Python (Flask)

@app.route('/resource')
def resource():
    return jsonify(error='Accepted'), 202

PHP

<?php
http_response_code(202);
header('Content-Type: application/json');
echo json_encode(['error' => 'Accepted']);

Check the status with curl

curl -I https://example.com/resource
# Look for: HTTP/1.1 202 Accepted

Frequently Asked Questions

What does HTTP 202 Accepted mean?

Request accepted but processing will complete asynchronously. In short: The request has been accepted for processing, but processing has not been completed.

How should I handle an HTTP 202 Accepted response?

Use for long-running async operations. Provide status check endpoint.

Official Specification

The 202 Accepted status code is defined in RFC 7231 Section 6.3.3.

View the IANA HTTP Status Code Registry →