Step 3 of 6 50% complete

Use Proper HTTP Status Codes

Status codes communicate intent instantly.

Common codes:

  • 200 OK - Success
  • 201 Created - Resource created
  • 204 No Content - Success, no body (DELETE)
  • 400 Bad Request - Client error (validation)
  • 401 Unauthorized - No/invalid auth
  • 403 Forbidden - Auth valid but not allowed
  • 404 Not Found - Resource does not exist
  • 500 Internal Error - Server bug