| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Default to a 30 second HTTP timeout to prevent hung processes. The timeout is passed through to python_http_client which already supports it. Callers can override or disable (via None) as needed. Timeouts via send() raise SendGridTimeoutError for clean handling.
|
Is this repo still being actively maintained? Happy to address any feedback if there's someone reviewing PRs. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes
HTTP requests made by this library (e.g., to send emails via the APIs) have no timeout by default. If a network issue causes a request to hang, the calling process blocks indefinitely.
This PR adds a timeout parameter (defaulting to 30 seconds) to SendGridAPIClient and TwilioEmailAPIClient. The underlying python_http_client already supports this. Callers can override the default or disable it by passing timeout=None.
Technically, this is a breaking change. Code that previously hung silently will now raise the new SendGridTimeoutError exception after timeout seconds. Anyone relying on infinite wait (intentionally or not) will see new exceptions.
That said, it's hard to argue the previous behavior was correct. A process hanging forever isn't really "working." But strictly by semver rules, changing the default from no timeout to 30 seconds is a breaking change since it alters existing behavior.
Checklist
and my PR follows them
If you have questions, please file a support ticket.