Skip to content

Follow-up: make flat error_code terminal detection advisory-safe #2230

@bokelley

Description

@bokelley

Argus follow-up from #2229.\n\nIn src/lib/utils/response-unwrapper.ts, the new flat error_code branch in isTerminalAdcpError is unconditional, while the existing errors[] branch defers to hasAdvisorySuccessPayload. Since success schemas are passthrough, a conformant success that echoes a stray top-level error_code string could be classified terminal and skip validation.\n\nSuggested fix: gate the flat error_code branch on !hasAdvisorySuccessPayload(obj, toolName) for symmetry with the array arm, then add a regression covering a success payload with advisory/stray error_code.\n\nNon-blocking follow-up from merged PR #2229.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions