Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: retry on intermittent Bad request for path: /ia/xml/xmlgw.phtml #9

Open
pnadolny13 opened this issue Nov 12, 2024 · 1 comment

Comments

@pnadolny13
Copy link
Contributor

Intacct seems to periodically throw this error which currently get raised and ends the sync singer_sdk.exceptions.FatalAPIError: 400 Client Error: Bad request for path: /ia/xml/xmlgw.phtml. We should use backoff handling to wait and retry. Its a bit tricky because 400's can be a legit bad request or this intermittent bad request so we should find a way to differentiate if we can otherwise its probably best to start with limited retry logic to avoid multiple retries on a legitimate bad request.

cc @edgarrmondragon

@edgarrmondragon
Copy link
Member

we should find a way to differentiate if we can
we definitely should try that. Maybe a header or something in response body.

Otherwise like you say we could try updating the extra_retry_statuses

from http import HTTPStatus

class IntacctStream(RESTStream):
    extra_retry_statuses = [
        HTTPStatus.BAD_REQUEST,
        HTTPStatus.TOO_MANY_REQUESTS,
    ]

which should the request be retried up to 5 times in case there's some server-side flakiness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants