fix(error): replace console.warn with handleInfraError in session-persistence

This commit is contained in:
Hibryda 2026-03-18 01:23:51 +01:00
parent d582a1d26c
commit 4fccc3f3e0

View file

@ -10,6 +10,7 @@ import {
saveSessionMetric,
type AgentMessageRecord,
} from '../adapters/groups-bridge';
import { handleInfraError } from './handle-error';
// Map sessionId -> projectId for persistence routing
const sessionProjectMap = new Map<SessionIdType, ProjectIdType>();
@ -104,7 +105,7 @@ export async function persistSessionForProject(sessionId: SessionIdType): Promis
error_message: session.error ?? null,
});
} catch (e) {
console.warn('Failed to persist agent session:', e);
handleInfraError(e, 'session-persistence.persistSession');
} finally {
pendingPersistCount--;
}