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 for 'list' object has no attribute 'startswith' #124

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tap_square/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def _retryable_v2_method(request_method, body, **kwargs):
is_service_unavailable = 'Service Unavailable' in error_message
is_upstream_error = 'upstream connect error or disconnect/reset before headers' in error_message
is_cf_error_1101 = '<span class="cf-error-code">1101</span>' in error_message
is_html_error = error_message.startswith('<!DOCTYPE html>')
is_html_error = error_message.startswith('<!DOCTYPE html>') if isinstance(error_message, str) else False
is_status_429_or_500 = result.status_code == 429 or result.status_code >= 500

retryable_conditions = {is_service_unavailable, is_upstream_error, is_cf_error_1101, is_html_error, is_status_429_or_500}
Expand Down
Loading