Skip to content

Commit

Permalink
Retry bad_gateway in cirq-ionq (#6006)
Browse files Browse the repository at this point in the history
* Retry bad_gateway in cirq-ionq

This error occurred due to a cloudflare outage, and should be retried to avoid disrupting automated usage of the libs.
  • Loading branch information
Cynocracy committed Feb 15, 2023
1 parent dd2667a commit fd491e0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cirq-ionq/cirq_ionq/ionq_client.py
Expand Up @@ -25,8 +25,11 @@
import cirq_ionq
from cirq_ionq import ionq_exceptions


RETRIABLE_STATUS_CODES = {requests.codes.internal_server_error, requests.codes.service_unavailable}
RETRIABLE_STATUS_CODES = {
requests.codes.internal_server_error,
requests.codes.bad_gateway,
requests.codes.service_unavailable,
}


def _is_retriable(code):
Expand Down

0 comments on commit fd491e0

Please sign in to comment.