Skip to content

Commit

Permalink
Logging
Browse files Browse the repository at this point in the history
  • Loading branch information
mchlwellman committed Dec 2, 2024
1 parent 003a08e commit 413cbde
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions app/clients/sms/twilio.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,8 @@ def send_sms(
return message.sid
except TwilioRestException as e:
self.logger.exception('Twilio send SMS request for %s failed', reference)
self.logger.debug('Twilio error code: %s, message: %s, details: %s', e.code, e.msg, e.details)
raise NonRetryableException('Twilio request failed') from e
# if e.status == 400 and 'phone number' in e.msg:
# self.logger.exception('Twilio send SMS request for %s failed', reference)
# raise InvalidProviderException from e
# else:
# raise
except:
self.logger.exception('Twilio send SMS request for %s failed', reference)
raise
Expand Down

0 comments on commit 413cbde

Please sign in to comment.