Skip to content

Commit f33f62d

Browse files
Merge pull request #546 from bmgalego/try-process-actions
fix: add try catch to process action
2 parents 5507d36 + 625550b commit f33f62d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/core/src/runtime.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -538,8 +538,12 @@ export class AgentRuntime implements IAgentRuntime {
538538
return;
539539
}
540540

541-
elizaLogger.success(`Executing handler for action: ${action.name}`);
542-
await action.handler(this, message, state, {}, callback);
541+
try {
542+
elizaLogger.info(`Executing handler for action: ${action.name}`);
543+
await action.handler(this, message, state, {}, callback);
544+
} catch (error) {
545+
elizaLogger.error(error);
546+
}
543547
}
544548

545549
/**

0 commit comments

Comments
 (0)