mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-21 16:27:18 +02:00
Keep handoff resolution logging non-fatal
This commit is contained in:
1 parent
fdf3e92ab4
commit
39072403f1
1 file changed
+23
-19
+23
-19
@@ -2549,26 +2549,30 @@ export function issueRoutes(
|
||||
});
|
||||
|
||||
if (existing.status === "in_progress" && issue.status !== existing.status && issue.status !== "in_progress") {
|
||||
const handoffStates = await listSuccessfulRunHandoffStates(db, issue.companyId, [issue.id]);
|
||||
const handoff = handoffStates.get(issue.id);
|
||||
if (handoff?.state === "required") {
|
||||
await logActivity(db, {
|
||||
companyId: issue.companyId,
|
||||
actorType: actor.actorType,
|
||||
actorId: actor.actorId,
|
||||
agentId: actor.agentId,
|
||||
runId: actor.runId,
|
||||
action: "issue.successful_run_handoff_resolved",
|
||||
entityType: "issue",
|
||||
entityId: issue.id,
|
||||
details: {
|
||||
identifier: issue.identifier,
|
||||
sourceRunId: handoff.sourceRunId,
|
||||
correctiveRunId: handoff.correctiveRunId,
|
||||
resolvedByStatus: issue.status,
|
||||
},
|
||||
await listSuccessfulRunHandoffStates(db, issue.companyId, [issue.id])
|
||||
.then(async (handoffStates) => {
|
||||
const handoff = handoffStates.get(issue.id);
|
||||
if (handoff?.state !== "required") return;
|
||||
await logActivity(db, {
|
||||
companyId: issue.companyId,
|
||||
actorType: actor.actorType,
|
||||
actorId: actor.actorId,
|
||||
agentId: actor.agentId,
|
||||
runId: actor.runId,
|
||||
action: "issue.successful_run_handoff_resolved",
|
||||
entityType: "issue",
|
||||
entityId: issue.id,
|
||||
details: {
|
||||
identifier: issue.identifier,
|
||||
sourceRunId: handoff.sourceRunId,
|
||||
correctiveRunId: handoff.correctiveRunId,
|
||||
resolvedByStatus: issue.status,
|
||||
},
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
logger.warn({ err, issueId: issue.id }, "failed to log successful run handoff resolution");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (Array.isArray(req.body.blockedByIssueIds)) {
|
||||
|
||||
Reference in new issue
Block a user