BugAlertDotOrg / bugalert

MIT License
207 stars 20 forks source link

Improvement: Small bugfixes for the Twilio work #74

Closed sullivanmatt closed 1 year ago

sullivanmatt commented 1 year ago

Twilio test went okay-ish! The big issue is that API Gateway times out after 30s (TIL) and our Lambda needs longer than that to run. Yes, Lambda will continue to crunch on things after the API Gateway gives up.

These changes remove the attempted .json() call to the requests.response object, since API Gateway timeouts aren't JSON. Also added some safety around calls to Twilio's libraries, since invalid phone numbers or transient connectivity issues can raise exceptions.