I am using Okta to manage authentication in my vue 3 application and for all my api requests to my api I use axios. It is unclear though how to handle 401 responses from my api. If a users token become stale and they go to another page in the application which does an axios request the response is 401 because the token is no longer good. My idea was to check the status code of every response in all of my axios requests and if its 401 then refresh the page however I am sure there has to be a better way with less redundant coding.