Clarify log error with a '[Pocketbase]' prefix
This commit is contained in:
parent
679a405d41
commit
8e9ffaa694
1 changed files with 6 additions and 8 deletions
|
|
@ -18,10 +18,8 @@ const syncManager = {
|
|||
_isSyncing: false,
|
||||
|
||||
async _getUserRecord(uid) {
|
||||
if (!uid) {
|
||||
console.warn('_getUserRecord called with no UID.');
|
||||
return null;
|
||||
}
|
||||
if (!uid) return null;
|
||||
|
||||
if (this._userRecordCache && this._userRecordCache.firebase_id === uid) {
|
||||
return this._userRecordCache;
|
||||
}
|
||||
|
|
@ -46,11 +44,11 @@ const syncManager = {
|
|||
this._userRecordCache = newRecord;
|
||||
return newRecord;
|
||||
} catch (createError) {
|
||||
console.error('Failed to create user record in PocketBase:', createError);
|
||||
console.error('[PocketBase] Failed to create user:', createError);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
console.error('Failed to get user record from PocketBase:', error);
|
||||
console.error('[PocketBase] Failed to get user:', error);
|
||||
return null;
|
||||
}
|
||||
},
|
||||
|
|
@ -567,10 +565,10 @@ const syncManager = {
|
|||
window.dispatchEvent(new CustomEvent('history-changed'));
|
||||
window.dispatchEvent(new HashChangeEvent('hashchange'));
|
||||
|
||||
console.log('[PocketBase] ✓ Sync completed successfully');
|
||||
console.log('[PocketBase] ✓ Sync completed');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error during PocketBase sync!', error);
|
||||
console.error('[PocketBase] Sync error:', error);
|
||||
} finally {
|
||||
this._isSyncing = false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue