Upload 5 modified files from chat-switchboard-v0.5.1-2.zip
This commit is contained in:
@@ -43,8 +43,14 @@ async function init() {
|
||||
await API.getProfile();
|
||||
console.log('✅ Session valid for', API.user?.username);
|
||||
} catch (e) {
|
||||
console.warn('⚠️ Session expired, clearing');
|
||||
API.clearTokens();
|
||||
if (e.status === 401) {
|
||||
console.warn('⚠️ Session expired, clearing');
|
||||
API.clearTokens();
|
||||
} else {
|
||||
// 404 = profile not created yet, other errors = transient
|
||||
// Token is still valid, proceed
|
||||
console.log('ℹ️ Profile fetch returned', e.status || e.message, '— session OK');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user