fix: custom sms send success but prompt fails

This commit is contained in:
jiangweidong
2024-07-12 18:31:55 +08:00
committed by Bryan
parent e9f4615caa
commit 281a2d9679
2 changed files with 2 additions and 3 deletions

View File

@@ -39,8 +39,7 @@ class CustomSMS(BaseSMSClient):
kwargs = {'params': params}
try:
response = action(url=settings.CUSTOM_SMS_URL, verify=False, **kwargs)
if response.reason != 'OK':
raise JMSException(detail=response.text, code=response.status_code)
response.raise_for_status()
except Exception as exc:
logger.error('Custom sms error: {}'.format(exc))
raise JMSException(exc)