Spring / Spring gRPC Interview Questions
What are gRPC status codes, and how do they compare to HTTP status codes?
gRPC defines its own enumerated Status codes - values like OK, NOT_FOUND, INVALID_ARGUMENT, DEADLINE_EXCEEDED, UNAVAILABLE, PERMISSION_DENIED, and UNAUTHENTICATED - that map conceptually to HTTP status ranges but are tailored specifically to RPC semantics rather than generic web resource semantics.
Under the hood, since gRPC runs over HTTP/2, the gRPC status is carried in an HTTP/2 trailer (sent after the message body), while the outer HTTP/2 response header status is almost always 200 - so unlike REST, you can't rely on the HTTP status alone to know if an RPC succeeded; you need to inspect the gRPC Status object returned to the client.
More Related questions...