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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]