Auth token expired during user session, but the error isn't handled properly.
// Buggy Code
const response = await fetch('/api/user/profile', {
headers: { Authorization: 'Bearer expired_token' }
});
const data = await response.json();
console.log(data.user.email);
// TypeError when 401 returns { error: 'Unauthorized' }