I have a created a middleware to check if the jwt token has expired.
For some reason the TokenHasExpiredError is not intercepted as an error in