gRPC status 1: CANCELLED
CANCELLED is gRPC status code 1. The call was cancelled, almost always by the caller.
Updated
Usual causes
- The client cancelled the call: a user pressed stop, a context was cancelled, or a parent request finished first.
- The client process shut down or closed the channel while the call was running.
- A proxy or load balancer cancelled the stream when its own client went away.
What to check
- Which side cancelled: the client log will show its own cancellation; the server only sees the stream reset.
- Whether a parent context with a shorter lifetime is passed into the call.
- Server-side, stop the work: check the context's
Doneor cancellation token so a cancelled call does not keep running.
Not to be confused with
DEADLINE_EXCEEDED is the deadline running out; CANCELLED is someone stopping the call before it did.
What it looks like
A typical error, as a Go client prints it: rpc error: code = Canceled desc = context canceled
Retry, and the HTTP equivalent
| CANCELLED | |
|---|---|
| Code | 1 |
| Name | CANCELLED |
| In istek's status bar | cancelled |
| Retry | Only if the caller still wants the result; a cancellation is normally deliberate. |
| HTTP status | 499 |
istek names the status of every call it makes, cancelled included, and explains transport failures in plain words. See istek.