sms: do not record errors for application-level errors (#65330) #466
|
@ -40,9 +40,11 @@ class PasserelleSMS:
|
|||
app_error_code = None
|
||||
if status == 200:
|
||||
app_error_code = get_app_error_code(response, data, 'json')
|
||||
if status != 200 or app_error_code:
|
||||
result = 'success' if (status == 200 and not app_error_code) else 'error'
|
||||
get_logger().debug('sms (to: %r): %s', destinations, result)
|
||||
else:
|
||||
get_logger().warning('sms (to: %r): error %s', destinations, status)
|
||||
raise SMSError()
|
||||
get_logger().debug('sms %r sent using passerelle to %r, result: %r', text, destinations, data)
|
||||
|
||||
|
||||
class SMS:
|
||||
|
|
Loading…
Reference in New Issue