fix(mcp): return explicit JSON-RPC errors instead of misleading Ok strings for missing entities and silent graph modification drops

This commit is contained in:
Riz Ashraf committed 2026-09-26 08:24:56 +01:00
1 parent cc190816fe
commit f81723a539
4 files changed
+27 -9

No files matched your search

+5 -5
View File
@@ -121,7 +121,7 @@ impl McpTool for DeleteTaskHandler {
][0]
.clone())
} else {
Ok("Task not found.".to_string())
Err("Task not found.".to_string())
}
}
}
@@ -264,7 +264,7 @@ impl McpTool for UpdateTaskStatusHandler {
} else if found {
Ok("Task status updated.".to_string())
} else {
Ok("Task not found.".to_string())
Err("Task not found.".to_string())
}
}
}
@@ -344,7 +344,7 @@ impl McpTool for SetAcceptanceCriteriaHandler {
if success {
Ok("Acceptance criteria set successfully.".to_string())
} else {
Ok("Task not found.".to_string())
Err("Task not found.".to_string())
}
}
}
@@ -393,7 +393,7 @@ impl McpTool for VerifyAcceptanceCriteriaHandler {
} else if already_met {
Ok("Acceptance criteria was already met.".to_string())
} else {
Ok("Acceptance criteria or task not found.".to_string())
Err("Acceptance criteria or task not found.".to_string())
}
}
}
@@ -452,7 +452,7 @@ impl McpTool for UpdateMilestoneHandler {
if found {
Ok("Milestone updated".to_string())
} else {
Ok("Milestone not found".to_string())
Err("Milestone not found".to_string())
}
}
}