gRPC

gRPC 1 CANCELLED vs 12 UNIMPLEMENTED

Both gRPC 1 (CANCELLED) and 12 (UNIMPLEMENTED) belong to the gRPC Status Codes category. 1 indicates that the operation was cancelled, typically by the caller. Meanwhile, 12 means that the operation is not implemented or is not supported/enabled in this service.

Beschreibung

The operation was cancelled, typically by the caller.

Wann Sie es sehen

The client explicitly cancelled the RPC, or a deadline or context cancellation propagated to the server before it could finish processing.

Wie man es behebt

If unexpected, check whether the client is setting too-short deadlines or if cancellation is being triggered inadvertently in your call chain.

Beschreibung

The operation is not implemented or is not supported/enabled in this service.

Wann Sie es sehen

The client called an RPC method that the server does not implement. This often happens when the client uses a newer proto definition than the server supports.

Wie man es behebt

Verify the server version supports the method you're calling. Update the server to implement the missing method, or use an alternative endpoint.

Wesentliche Unterschiede

1.

gRPC 1: The operation was cancelled, typically by the caller.

2.

gRPC 12: The operation is not implemented or is not supported/enabled in this service.

3.

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.

4.

You encounter 12 when the client called an RPC method that the server does not implement. This often happens when the client uses a newer proto definition than the server supports.

Wann welchen verwenden

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 12 (UNIMPLEMENTED): Verify the server version supports the method you're calling. Update the server to implement the missing method, or use an alternative endpoint.

Mehr erfahren