Skip to content

Commit

Permalink
doc: clarify status code behavior outside the defined range of codes
Browse files Browse the repository at this point in the history
  • Loading branch information
dfawley committed Oct 4, 2023
1 parent b581a24 commit c074e8d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions doc/statuscodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@ statuses are defined as such:
| UNAUTHENTICATED | 16 | The request does not have valid authentication credentials for the operation. |

All RPCs started at a client return a `status` object composed of an integer
`code` and a string `message`. The server-side can choose the status it
returns for a given RPC.
`code` and a string `message`. The server-side can choose the status it returns
for a given RPC. gRPC servers should never return a status whose `code` is
outside the range of codes defined above; any other value should be converted to
`UNKNOWN` (2) before being transmitted. Similarly, gRPC clients that receive
any value outside the range of codes defined above should convert the error to
`UNKNOWN` before returning it to the application.

The gRPC client and server-side implementations may also generate and
return `status` on their own when errors happen. Only a subset of
Expand Down

0 comments on commit c074e8d

Please sign in to comment.