USFEMA_FloodInsuranceClaims download-fix#2070
Conversation
Code fix unenergy
There was a problem hiding this comment.
Code Review
This pull request increases the retry attempts and delay for downloading FEMA flood insurance claims data. The reviewer noted that the new configuration (10 tries with a delay of 10 and backoff of 2) results in an excessively long cumulative wait time of over 85 minutes, which could trigger execution timeouts. They suggested reducing the number of retries to 6 to keep the total duration within a reasonable limit.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
This PR resolves download failures in the FEMA NFIP claims data pipeline caused by transient HTTP 503 Service Unavailable errors from the FEMA API.
During heavy load or rapid sequential paging, the FEMA endpoint frequently returns 503 errors, causing the script to abort prematurely with Failed to download chunk or
file not found. Exiting..
Changes Made
PR Checklist -
https://docs.google.com/spreadsheets/d/1SQJmVsUVwyI9P4P7uea2TOQHEOkFUQWZ-ubwKCFzuP8/edit?resourcekey=0-7h8GibY2hKZgbCHAxy_cOQ&gid=1086229089#gid=1086229089