-
Notifications
You must be signed in to change notification settings - Fork 184
Closed
Labels
type: bugAn issue or pull request relating to a bugAn issue or pull request relating to a bugtype: documentationAn issue or pull request for improving or updating the documentationAn issue or pull request for improving or updating the documentation
Description
Describe the bug
See here, user defined retry_execute
wraps only self._execute
. I have a poor quality backend which will return error on random.
So I want to catch all exceptions include TransportQueryError
. But current framework won't work.
Lines 1628 to 1644 in 48bb94c
result = await self._execute( | |
document, | |
variable_values=variable_values, | |
operation_name=operation_name, | |
serialize_variables=serialize_variables, | |
parse_result=parse_result, | |
**kwargs, | |
) | |
# Raise an error if an error is returned in the ExecutionResult object | |
if result.errors: | |
raise TransportQueryError( | |
str_first_element(result.errors), | |
errors=result.errors, | |
data=result.data, | |
extensions=result.extensions, | |
) |
BTW, current document is a little misleading:
# Here Only 3 tries for execute calls
retry_execute = backoff.on_exception(
backoff.expo,
Exception,
max_tries=3,
giveup=lambda e: isinstance(e, TransportQueryError),
)
session = await client.connect_async(
reconnecting=True,
retry_execute=retry_execute,
)
Users like me will believe remove giveup keyword will alllow it retry on TransportQueryError
leszekhanusz
Metadata
Metadata
Assignees
Labels
type: bugAn issue or pull request relating to a bugAn issue or pull request relating to a bugtype: documentationAn issue or pull request for improving or updating the documentationAn issue or pull request for improving or updating the documentation