gRPC 1 CANCELLED vs 13 INTERNAL
Both gRPC 1 (CANCELLED) and 13 (INTERNAL) belong to the gRPC Status Codes category. 1 indicates that the operation was cancelled, typically by the caller. Meanwhile, 13 means that an internal error occurred. This means that some invariant expected by the underlying system has been broken.
คำอธิบาย
The operation was cancelled, typically by the caller.
เมื่อคุณพบเห็น
The client explicitly cancelled the RPC, or a deadline or context cancellation propagated to the server before it could finish processing.
วิธีแก้ไข
If unexpected, check whether the client is setting too-short deadlines or if cancellation is being triggered inadvertently in your call chain.
คำอธิบาย
An internal error occurred. This means that some invariant expected by the underlying system has been broken.
เมื่อคุณพบเห็น
A server-side bug, a corrupted internal state, or an unexpected failure in a dependency. This is the gRPC equivalent of HTTP 500.
วิธีแก้ไข
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.
ความแตกต่างหลัก
gRPC 1: The operation was cancelled, typically by the caller.
gRPC 13: An internal error occurred. This means that some invariant expected by the underlying system has been broken.
You encounter 1 when the client explicitly cancelled the RPC, or a deadline or context cancellation propagated to the server before it could finish processing.
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.
ควรใช้อันไหนเมื่อไร
For 1 (CANCELLED): If unexpected, check whether the client is setting too-short deadlines or if cancellation is being triggered inadvertently in your call chain. 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.