Skip to content

Instantly share code, notes, and snippets.

@syuji-higa
Last active October 25, 2021 04:22
Show Gist options
  • Save syuji-higa/b900f189da6752a637139abefe05f79b to your computer and use it in GitHub Desktop.
Save syuji-higa/b900f189da6752a637139abefe05f79b to your computer and use it in GitHub Desktop.
OpenAPI 3.0 gRPC Error Code
# 400 Status Code
BadRequestStatusCode:
type: string
enum: # gRPC Status Code
- INVALID_ARGUMENT
- FAILED_PRECONDITION
- OUT_OF_RANGE
# 401 Status Code
UnauthorizedStatusCode:
type: string
enum: # gRPC Status Code
- UNAUTHENTICATED
# 403 Status Code
ForbiddenStatusCode:
type: string
enum: # gRPC Status Code
- PERMISSION_DENIED
# 404 Status Code
NotFoundStatusCode:
type: string
enum: # gRPC Status Code
- NOT_FOUND
# 409 Status Code
ConflictStatusCode:
type: string
enum: # gRPC Status Code
- ALREADY_EXISTS
- ABORTED
# 429 Status Code
TooManyRequestsStatusCode:
type: string
enum: # gRPC Status Code
- RESOURCE_EXHAUSTED
# 499 Status Code
ClientClosedRequestStatusCode:
type: string
enum: # gRPC Status Code
- CANCELLED
# 500 Status Code
InternalServerStatusCode:
type: string
enum: # gRPC Status Code
- UNKNOWN
- INTERNAL
- DATA_LOSS
# 501 Status Code
NotImplementedStatusCode:
type: string
enum: # gRPC Status Code
- UNIMPLEMENTED
# 503 Status Code
UnavailableStatusCode:
type: string
enum: # gRPC Status Code
- UNAVAILABLE
# 504 Status Code
GatewayTimeoutStatusCode:
type: string
enum: # gRPC Status Code
- DEADLINE_EXCEEDED
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment