Keycloak-Conncet Nodejs keycloak.protect() returns 403 instead Of 401 when token expires

Hi, i am using keycloak-connect with node js and encountering a problem which is whenever i am using the keycloak.protect() its giving me the 403 error code which is completely fine when user has no permission for accessing the resource but when the token gets expired its also showing me the 403 status code. Is there any way to show 401 status code when the token gets expired?