gRPC
When a gRPC stream is refused or ended by the service, the response carries:- a gRPC status code,
- an
x-error-codeheader or trailer with one of the codes below, - a status message ending in
(code: …)with the same code.
UNAUTHENTICATED, NOT_ENTITLED, IP_NOT_ALLOWED and QUOTA_EXCEEDED also end streams that are already open. Revoking a key, a plan expiring, removing an IP or running out of data ends a running stream within about 30 seconds, with the matching code.
Reading the code
RPC
Errors raised by the RPC service itself use HTTP status codes and a JSON-RPC error body:
Errors about the request itself, such as invalid parameters or an unknown method, come back as standard Solana JSON-RPC errors with HTTP 200.