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.
Descripción
Some requested entity was not found. For example, a file or directory that the RPC was supposed to operate on does not exist.
Cuándo lo verás
The resource referenced in the request doesn't exist — such as looking up a user by ID that has been deleted or never created.
Cómo solucionarlo
Verify the resource identifier is correct. Ensure the resource was created before accessing it, or handle the not-found case gracefully in your client.
Descripción
An internal error occurred. This means that some invariant expected by the underlying system has been broken.
Cuándo lo verás
A server-side bug, a corrupted internal state, or an unexpected failure in a dependency. This is the gRPC equivalent of HTTP 500.
Cómo solucionarlo
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.
Diferencias clave
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.
Cuándo usar cada uno
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.