Skip to content

Commit

Permalink
fix: map 504 errors to DEADLINE_EXCEEDED (#663)
Browse files Browse the repository at this point in the history
This is needed to test behavior with DEADLINE_EXCEEDED errors for gRPC.
GCS is still returning these errors in some cases for internal timeouts
so we need to be able to test this.
  • Loading branch information
tritone authored Aug 5, 2024
1 parent ed7453c commit 6fe4bc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion testbench/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1182,6 +1182,6 @@ def _grpc_forced_failure_from_http_instruction(http_code):
"429": StatusCode.RESOURCE_EXHAUSTED,
"500": StatusCode.INTERNAL,
"503": StatusCode.UNAVAILABLE,
"504": StatusCode.UNAVAILABLE, # TODO: Unresolved discussion on whether DEADLINE_EXCEEDED is retryable client-side based on AIP#194
"504": StatusCode.DEADLINE_EXCEEDED,
}
return status_map.get(http_code, None)

0 comments on commit 6fe4bc9

Please sign in to comment.