perf: 邮箱发送失败提示优化

This commit is contained in:
韦荣超 2022-03-04 18:39:30 +08:00
parent 01355b9a28
commit 97fb0ba95a

View File

@ -67,10 +67,13 @@ class UserEmailVerification extends AbstractModel
}); });
} catch (Exception $exception) { } catch (Exception $exception) {
// 一般是请求超时 // 一般是请求超时
if (strpos($exception->getMessage(), "Timed Out") !== false) if (strpos($exception->getMessage(), "Timed Out") !== false) {
throw new ApiException("language.TimedOut"); throw new ApiException("language.TimedOut");
else } elseif ($exception->getCode() == 550) {
throw new ApiException('邮件内容被拒绝,请检查邮箱是否开启接收功能');
} else {
throw new ApiException($exception->getMessage()); throw new ApiException($exception->getMessage());
}
} }
} }
} }