Skip to content

Conversation

zevaverbach
Copy link
Contributor

@zevaverbach zevaverbach commented Jun 1, 2023

Removed unused variable asset_report_pdf.
Removed unused imports:

from flask import render_template
from plaid.exceptions import ApiException
from werkzeug.wrappers import response

Simplified import and usage of datetime functions.

Fixed a bug in while num_retries_remaining > 0 code block, and the line just following it. In both the error_response = ... and if asset_report_json ... blocks, the variable e was unbound. This is resolved by declaring err as None before the block, then assigning to err on each retry. err is then used after the while block.

I also put an else: before the two lines starting with error_response = ... so they would actually run. My assumption is that these were meant to run if the error is anything aside from PRODUCT_NOT_READY, whereas currently the continue statement makes those lines unreachable.

Copy link
Contributor

@phoenixy1 phoenixy1 left a comment

Choose a reason for hiding this comment

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

thanks for the PR!

@phoenixy1 phoenixy1 merged commit 2786fd9 into plaid:master Jun 2, 2023
SpencerHHurst pushed a commit to SpencerHHurst/quickstart that referenced this pull request Jul 10, 2024
…x_err_bug

Organize imports and fix "e" bug
fisherrjd pushed a commit to fisherrjd/quickstart that referenced this pull request Oct 12, 2024
…x_err_bug

Organize imports and fix "e" bug
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