This adds an optional max_tries parameter to the download function that will throw StatementGenerationTimeout if exceeded.
Sometimes, especially on the weekend, the flex server responds with ("1019", "Statement generation in progress. Please try again shortly.") but it doesn't finish in any reasonable amount of time, and just keeps responding with 1019.
I suspect that their API server is up, but some other server the Flex service depends on is down. Having a max_tries makes it easy for an application to bail on the download if desired.
This adds an optional max_tries parameter to the download function that will throw StatementGenerationTimeout if exceeded.
Sometimes, especially on the weekend, the flex server responds with ("1019", "Statement generation in progress. Please try again shortly.") but it doesn't finish in any reasonable amount of time, and just keeps responding with 1019.
I suspect that their API server is up, but some other server the Flex service depends on is down. Having a max_tries makes it easy for an application to bail on the download if desired.