fix(frida): name the argument each Frida input error rejects (#2217)
Frida session lookups, script lookups, unreadable script files and the instrument-with-frida PID and script checks returned invalid_request with no issues, while the remediation told callers to correct the listed arguments. Attach the session_id, script_id, path, target or script issue with the reason so CLI and MCP callers can see what to fix. Fixes #2213 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
109769319a
commit
86de439ba4
@@ -12,6 +12,7 @@ import { jsonValueSchema } from "../domain/jsonValue.js";
|
||||
import { logToolExecution } from "./toolLogging.js";
|
||||
import { toolRegistrationOptions } from "./toolRegistrationOptions.js";
|
||||
import type { ToolResultDelivery } from "./toolResult.js";
|
||||
import { unknownFridaSession } from "../application/frida/fridaInputErrors.js";
|
||||
|
||||
/** Register Frida device discovery and persistent instrumentation operations. */
|
||||
export const registerFridaTools = (
|
||||
@@ -199,7 +200,7 @@ export const registerFridaTools = (
|
||||
return delivery.toCallToolResult(
|
||||
{
|
||||
ok: false as const,
|
||||
error: new AnalysisInputError(status.name),
|
||||
error: unknownFridaSession(status.name, input.session_id),
|
||||
},
|
||||
status,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user