Skip to main content
err:user:bad_request:client_closed_request
Your client closed the connection before the API finished, so the API stopped working on the request. It’s recorded as HTTP 499. You’ll usually see it in your Unkey request logs rather than in a response, because no client was left to receive one.
Example response

Likely causes

  • Your HTTP client’s timeout is shorter than the request takes. This is common on keys.verifyKey when the verification timeout is tighter than the network allows.
  • Your code aborted the request, for example in a retry loop that cancels requests still in flight.
  • The client closed the connection or the process exited.

How to fix

  1. Set your client timeout to at least the API’s one-minute deadline, or measure real latency and leave headroom.
  2. Don’t cancel in-flight requests when you retry.
  3. A canceled write may or may not have gone through. Read the resource back before you retry a create.
Last modified on October 6, 2026