Skip to content

Commit

Permalink
Fix HTTP Status to Code mapping (#673)
Browse files Browse the repository at this point in the history
Adds two missing conversions from the spec, 409 and 415.
https://connectrpc.com/docs/protocol#http-to-error-code
  • Loading branch information
emcfarlane authored Jan 25, 2024
1 parent e7e5a32 commit 8fad019
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions protocol_connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -1266,10 +1266,14 @@ func connectHTTPToCode(httpCode int) Code {
return CodeUnimplemented
case 408:
return CodeDeadlineExceeded
case 409:
return CodeAborted
case 412:
return CodeFailedPrecondition
case 413:
return CodeResourceExhausted
case 415:
return CodeInternal
case 429:
return CodeUnavailable
case 431:
Expand Down

0 comments on commit 8fad019

Please sign in to comment.