gRPC 5 NOT_FOUND vs 13 INTERNAL
Both gRPC 5 (NOT_FOUND) and 13 (INTERNAL) belong to the gRPC Status Codes category. 5 indicates that some requested entity was not found. For example, a file or directory that the RPC was supposed to operate on does not exist. Meanwhile, 13 means that an internal error occurred. This means that some invariant expected by the underlying system has been broken.
Description
Some requested entity was not found. For example, a file or directory that the RPC was supposed to operate on does not exist.
Quand vous le voyez
The resource referenced in the request doesn't exist — such as looking up a user by ID that has been deleted or never created.
Comment résoudre
Verify the resource identifier is correct. Ensure the resource was created before accessing it, or handle the not-found case gracefully in your client.
Description
An internal error occurred. This means that some invariant expected by the underlying system has been broken.
Quand vous le voyez
A server-side bug, a corrupted internal state, or an unexpected failure in a dependency. This is the gRPC equivalent of HTTP 500.
Comment résoudre
Check the server error logs and traces for the root cause. This typically indicates a bug that needs to be fixed in the server code.
Différences clés
gRPC 5: Some requested entity was not found. For example, a file or directory that the RPC was supposed to operate on does not exist.
gRPC 13: An internal error occurred. This means that some invariant expected by the underlying system has been broken.
You encounter 5 when the resource referenced in the request doesn't exist — such as looking up a user by ID that has been deleted or never created.
You encounter 13 when a server-side bug, a corrupted internal state, or an unexpected failure in a dependency. This is the gRPC equivalent of HTTP 500.
Quand utiliser lequel
For 5 (NOT_FOUND): Verify the resource identifier is correct. Ensure the resource was created before accessing it, or handle the not-found case gracefully in your client. For 13 (INTERNAL): Check the server error logs and traces for the root cause. This typically indicates a bug that needs to be fixed in the server code.