gRPC 13 INTERNAL vs 16 UNAUTHENTICATED
Both gRPC 13 (INTERNAL) and 16 (UNAUTHENTICATED) belong to the gRPC Status Codes category. 13 indicates that an internal error occurred. This means that some invariant expected by the underlying system has been broken. Meanwhile, 16 means that the request does not have valid authentication credentials for the operation.
Description
An internal error occurred. This means that some invariant expected by the underlying system has been broken.
When You See It
A server-side bug, a corrupted internal state, or an unexpected failure in a dependency. This is the gRPC equivalent of HTTP 500.
How to Fix
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.
Description
The request does not have valid authentication credentials for the operation.
When You See It
No credentials were provided, or the provided token/certificate is expired or invalid. Different from PERMISSION_DENIED (code 7), which means authenticated but not authorized.
How to Fix
Provide valid authentication credentials (e.g., refresh the OAuth token, regenerate the API key, or renew the client certificate).
Key Differences
gRPC 13: An internal error occurred. This means that some invariant expected by the underlying system has been broken.
gRPC 16: The request does not have valid authentication credentials for the operation.
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.
You encounter 16 when no credentials were provided, or the provided token/certificate is expired or invalid. Different from PERMISSION_DENIED (code 7), which means authenticated but not authorized.
When to Use Which
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. For 16 (UNAUTHENTICATED): Provide valid authentication credentials (e.g., refresh the OAuth token, regenerate the API key, or renew the client certificate).