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
@@ -220,7 +220,18 @@ export const registerFridaCommands = (
|
||||
(options.scriptFile === undefined)
|
||||
)
|
||||
return projectAnalysisError(
|
||||
new AnalysisInputError(CLI_COMMANDS.instrumentWithFrida),
|
||||
new AnalysisInputError(
|
||||
CLI_COMMANDS.instrumentWithFrida,
|
||||
undefined,
|
||||
[
|
||||
{
|
||||
path: ["script"],
|
||||
reason: "invalid_value",
|
||||
message:
|
||||
"Provide exactly one of --script or --script-file.",
|
||||
},
|
||||
],
|
||||
),
|
||||
);
|
||||
const remote = remoteFrom(options);
|
||||
const selected =
|
||||
@@ -248,7 +259,17 @@ export const registerFridaCommands = (
|
||||
};
|
||||
if (targetInput === undefined)
|
||||
return projectAnalysisError(
|
||||
new AnalysisInputError(CLI_COMMANDS.instrumentWithFrida),
|
||||
new AnalysisInputError(
|
||||
CLI_COMMANDS.instrumentWithFrida,
|
||||
undefined,
|
||||
[
|
||||
{
|
||||
path: ["target"],
|
||||
reason: "invalid_value",
|
||||
message: "attach mode needs a positive integer process ID.",
|
||||
},
|
||||
],
|
||||
),
|
||||
);
|
||||
const result = await withProviderCleanup(() =>
|
||||
service.instrument(
|
||||
|
||||
Reference in New Issue
Block a user