Access token expires after token not updating in angular keycloak

Hi all
We are using below mentioned code to update the users token when users access token is expired , in our angular application ,But the issue when calling updateToken() function , we are getting the error message in console like this (POST *http://localhost/auth/realms/ master/protocol/openid-connect/token )400 BadRequest Promise rejection.

And we are configured master token in admin console like this
*SSO Session Idle :1hour
*SSO Session Idle : 1 day
*Access Token Lifespan : 1day

keycloakService.keycloakEvents$.subscribe({
next: (e) => {
if (e.type == KeycloakEventType.OnTokenExpired) {
keycloakService.updateToken(20);
}
}
});

Please anyone know about this issue help us

@Tharunvarshanth were you able to find a solution to this?

yes,theoretically refresh token expire time should be greater then access token expire time , so we have maintained SSO Session Idle and SSO Session Idle same value with greater access token expiration time then above code will get’s works