Skip to content

changes - #55

Open
ZachSchwartz wants to merge 1 commit into
mainfrom
Address-API-Failure-Handling-Issues
Open

ZachSchwartz wants to merge 1 commit into
mainfrom
Address-API-Failure-Handling-Issues

Conversation

@ZachSchwartz

Copy link
Copy Markdown
Contributor
  1. One error type: every "the provider failed" problem now raises the same kind of error, so the tool can tell a real failure from "no match found".
  2. Failures aren't saved: only real answers, including real "no match" answers, get cached, so a failure is asked again on the next run instead of being
    remembered as "no match".
  3. Smarter retries: the tool retries only problems that can clear up on their own, like a dropped connection, a busy server or a rate limit, and stops at
    once for problems that won't, like a bad API key.
  4. Polite waiting: between retries it waits a little longer each time, with some randomness, and never more than 60 seconds.
  5. Server timing: when a server says "wait N seconds", the tool waits that long, up to the same 60-second cap.
  6. Key never shown: error messages blank out your API key, so it doesn't leak into logs or screenshots.
  7. Provider's own reason: when a request is refused, the error includes the provider's explanation, such as "Invalid API key".
  8. Garbled replies: if a provider sends back something that isn't valid data, like a proxy's web page, the error names the provider and shows what came
    back.
  9. Google checks: a Google "success" reply is checked for an actual result with a location before it's used.
  10. Geocodio checks: a Geocodio reply is checked for a usable result for every address, and an error hidden inside a result is treated as a failure.
  11. Census checks: each Census reply row must match exactly one address that was sent, with no extras, duplicates or gaps.
  12. Census statuses: a Census row with an unknown status is now an error instead of quietly counting as "no match".
  13. All-or-nothing batches: a whole batch is checked before any of it is saved, so one bad batch can't leave half its results in the cache.
  14. Clean CLI errors: command-line users now see a one-line error: ... message instead of a wall of technical output.
  15. Tests: new tests cover each of these failure cases so they stay fixed.

@mwaddell

Copy link
Copy Markdown
Member

@ZachSchwartz - if this is ready for my review, please assign me as a reviewer. If it addresses some/all of a particular issue, please relate it to that issue.

@mwaddell mwaddell added the blocked Cannot be merged until related work is complete label Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked Cannot be merged until related work is complete

Development

Successfully merging this pull request may close these issues.

2 participants