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

next: (e) => {
if (e.type == KeycloakEventType.OnTokenExpired) {

Please anyone know about this issue help us