We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
应该预知返回错误抛出异常,比如在拿access token的时候有段代码:
$token = $this->getTokenFromServer(); $this->cache->set($cacheKey, $token['access_token'], $token['expires_in'] - 1500);
你这里总是可以拿到$token['access_token']的。
但事实上会有很多原因会拿不到这个access_token。
其它的接口有类似的情况,应当考虑下错误码和网络的情况。
The text was updated successfully, but these errors were encountered:
OK,收到
Sorry, something went wrong.
$this->getTokenFromServer();
这一步失败会直接异常了,所以不需要判断
No branches or pull requests
应该预知返回错误抛出异常,比如在拿access token的时候有段代码:
你这里总是可以拿到$token['access_token']的。
但事实上会有很多原因会拿不到这个access_token。
其它的接口有类似的情况,应当考虑下错误码和网络的情况。
The text was updated successfully, but these errors were encountered: