What is the Correct HTTP Status Code for a Cancelled Request

To be consistent I would suggest 400 Bad Request now if your backend apps are capable of identifying when the client gets disconnected or if you reject or close the connection, probably you could return Nginx’ non-standard code 499 or 444.

  • 499 Client Closed Request
    Used when the client has closed the request before the server could send a response.

  • 444 No Response
    Used to indicate that the server has returned no information to the client and closed the connection.

Leave a Comment

File not found.