What is the HTTP response code for failed HTTP Delete operation?

The response code for a delete call can be any of the following :

  • DELETE /api/book/122 – The server successfully processed the request, but is not returning any content
    • 204 No Content
  • DELETE /api/book/122 – Resource does not exist
    • 404 Not Found
  • DELETE /api/book/122 – Resource already deleted
    • 410 Gone
  • DELETE /api/book/122 – Users does not have permission

    • 403 Forbidden
  • DELETE /api/book/122 – Method Not Allowed

    • 405 Method Not Allowed
  • DELETE /api/book/122 – Conflict (User can resolve the conflict and delete)

    • 409 Conflict

In your case 404 is apt.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)