Skip to content

Commit 75bd933

Browse files
committed
fix(scheduled-tasks): log agent-context resolution failures in execute route
1 parent a6f06af commit 75bd933

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

  • apps/sim/app/api/mothership/execute

apps/sim/app/api/mothership/execute/route.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,14 @@ export const POST = withRouteHandler(async (req: NextRequest) => {
152152
lastUserMessage,
153153
workspaceId,
154154
effectiveChatId
155-
).catch(() => []),
155+
).catch((error) => {
156+
// Degrade to a context-less run rather than failing the whole execution,
157+
// but surface the failure so a broken mention is diagnosable.
158+
reqLogger.warn('Failed to resolve agent contexts for execution', {
159+
error: toError(error).message,
160+
})
161+
return []
162+
}),
156163
])
157164
const requestPayload: Record<string, unknown> = {
158165
messages,

0 commit comments

Comments
 (0)