Well the case 401 is already checking that for you! When your server returns a 401, it means the client is unauthorized. So that's when the popup should show!
Source: https://httpstatuses.com/401
I see that the code also fires a bit of jQuery code in here, or at least it kicks of the modal for the session. Are you sure jQuery is loaded? Also does your developer console show anything? You can test this by setting the session time really low for example. An alternative is just firing the modal in all cases, just to check!
window.axios.interceptors.response.use(function (response) {
// On success fire modal
$('#modal-session-expired').modal('show');
return response;
}, function (error) {
// On error fire modal
$('#modal-session-expired').modal('show');
return Promise.reject(error);
});