Skip to content

Commit aa3dadb

Browse files
committed
throw on failure to get conn observations - prevents potential infinite wait loop if browser closed
1 parent 965eb87 commit aa3dadb

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

.changeset/loose-jokes-joke.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"magnitude-core": patch
3+
---
4+
5+
throw on failure to get conn observations - prevents potential infinite wait loop if browser closed

packages/magnitude-core/src/agent/index.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -219,15 +219,11 @@ export class Agent {
219219

220220
protected async _recordConnectorObservations(memory: AgentMemory) {
221221
for (const connector of this.connectors) {
222-
try {
223-
// could do Promise.all if matters
224-
const connObservations = connector.collectObservations ? await connector.collectObservations() : [];
225-
//observations.push(...connObservations);
226-
for (const obs of connObservations) {
227-
memory.recordObservation(obs);
228-
}
229-
} catch (error) {
230-
logger.warn(`Agent: Error getting observations from connector ${connector.id}: ${error instanceof Error ? error.message : String(error)}`);
222+
// could do Promise.all if matters
223+
const connObservations = connector.collectObservations ? await connector.collectObservations() : [];
224+
//observations.push(...connObservations);
225+
for (const obs of connObservations) {
226+
memory.recordObservation(obs);
231227
}
232228
}
233229
}

0 commit comments

Comments
 (0)