Skip to content

Add backoff on calls to login fn#6

Open
KAllan357 wants to merge 1 commit into
masterfrom
retry-504s-for-login
Open

Add backoff on calls to login fn#6
KAllan357 wants to merge 1 commit into
masterfrom
retry-504s-for-login

Conversation

@KAllan357

Copy link
Copy Markdown
Contributor

Description of change

In a busy Pardot API scenario, its possible for the call to login to be rate limited. This is an attempt to retry those errors.

Manual QA steps

Risks

Rollback steps

  • revert this branch

@dmosorast dmosorast left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, I think the retry pattern is good, just one change.

Comment thread tap_pardot/client.py
response.raise_for_status()
# 5xx errors should be retried
if response.status_code >= 500:
raise Pardot5xxError()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we still want to maybe raise_for_status after the _check_error call below, to catch any statuses that we don't know about yet.

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

Successfully merging this pull request may close these issues.

2 participants