Browse Source

验证码不全日志

master
weigang 5 years ago
parent
commit
12a2f2e48c
  1. 6
      app/Service/v3/Implementations/SmsAliSendService.php
  2. 2
      app/Service/v3/Implementations/VerifyCodeService.php

6
app/Service/v3/Implementations/SmsAliSendService.php

@ -51,13 +51,13 @@ class SmsAliSendService implements SmsSendServiceInterface
->request(); ->request();
return $result->toArray(); return $result->toArray();
} catch (ClientException $e) { } catch (ClientException $e) {
$this->log->event('alisms', ['alisms_error_ClientException' => $e->getErrorMessage()]);
$this->log->event('alisms', ['alisms_error_ClientException' => $e->getErrorMessage(), 'tel' => $tel, 'template' => json_encode($templateParams)]);
throw new ErrorCodeException(ErrorCode::SMS_SEND_FAILURE); throw new ErrorCodeException(ErrorCode::SMS_SEND_FAILURE);
} catch (ServerException $e) { } catch (ServerException $e) {
$this->log->event('alisms', ['alisms_error_ServerException' => $e->getErrorMessage()]);
$this->log->event('alisms', ['alisms_error_ServerException' => $e->getErrorMessage(), 'tel' => $tel, 'template' => json_encode($templateParams)]);
throw new ErrorCodeException(ErrorCode::SMS_SEND_FAILURE); throw new ErrorCodeException(ErrorCode::SMS_SEND_FAILURE);
} catch (Exception $e) { } catch (Exception $e) {
$this->log->event('alisms', ['alisms_error_Exception' => $e->getErrorMessage()]);
$this->log->event('alisms', ['alisms_error_Exception' => $e->getErrorMessage(), 'tel' => $tel, 'template' => json_encode($templateParams)]);
throw new ErrorCodeException(ErrorCode::SMS_SEND_FAILURE); throw new ErrorCodeException(ErrorCode::SMS_SEND_FAILURE);
} }
} }

2
app/Service/v3/Implementations/VerifyCodeService.php

@ -55,7 +55,7 @@ class VerifyCodeService implements VerifyCodeServiceInterface
// 发送短信 // 发送短信
$smsRes = $this->smsService->doVerifyCode($tel, $verifyCode); $smsRes = $this->smsService->doVerifyCode($tel, $verifyCode);
if (!$smsRes) { if (!$smsRes) {
throw new ErrorCodeException(ErrorCode::VERIFY_CODE_ERROR);
throw new ErrorCodeException(ErrorCode::VERIFY_CODE_ERROR, '', ['tel' => $tel, 'verifyCode' => $verifyCode]);
} }
return true; return true;

Loading…
Cancel
Save