You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by "likyh (via GitHub)" <gi...@apache.org> on 2023/05/15 05:58:45 UTC
[GitHub] [incubator-devlake] likyh commented on a diff in pull request #5174: Refresh token
likyh commented on code in PR #5174:
URL: https://github.com/apache/incubator-devlake/pull/5174#discussion_r1193356550
##########
config-ui/src/utils/request.ts:
##########
@@ -37,6 +39,38 @@ instance.interceptors.response.use(
history.push('/login');
}
+ if (status === 403) {
+ var refreshToken = localStorage.getItem('refreshToken');
+ if (refreshToken) {
+ refreshingToken =
+ refreshingToken ||
+ request('/login/refreshtoken', {
+ method: 'POST',
+ data: {
+ refreshToken: refreshToken,
+ },
+ })
+ .then((resp) => {
Review Comment:
I think err handle should move to `.then` from `.catch(……`. `.catch` will catch both request error and the error trigger by `.then`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org