Hi,
https://github.com/axios/axios#interceptors
you could check on every request, for example
// values inside if statement are placeholders
if (response.message === 'authentication required') {
// behave however you want
}
and of course you would search for some articles
https://thedutchlab.com/blog/using-axios-interceptors-for-refreshing-your-api-token
https://medium.com/@yaob/how-to-globally-use-axios-instance-and-interceptors-e28f351bb794