Skip to content

2xx Success

204 No Content

The request succeeded and there's no body to return.

What 204 means

Common for DELETE, and for PUT or PATCH when the server doesn't return the updated resource.

Common causes

  • A successful DELETE, update or action with nothing to return.

How to fix it

If you're calling an API

  • Don't call response.json() on a 204: there's no body, so JSON parsing throws.

If you run the server

  • Never include a body with 204.

Should you retry?

No need.

Example response

HTTP
HTTP/1.1 204 No Content

Defined in: RFC 9110 (HTTP Semantics). 204 is a success.

HTTP 204 FAQ

What does HTTP 204 mean?

204 No Content: The request succeeded and there's no body to return. Common for DELETE, and for PUT or PATCH when the server doesn't return the updated resource.

Is 204 a client or server error?

Neither: 204 is a success response (2xx). The request was received, understood and accepted.

How do I fix a 204 error?

Don't call response.json() on a 204: there's no body, so JSON parsing throws.

Should I retry after a 204?

No need.

Other 2xx status codes

All HTTP status codes