Skip to content

Dead string-matching fallback in classify_parameter_error misclassifies to 400 if ever reached #542

Description

@mfaferek93

classify_parameter_error in src/ros2_medkit_gateway/src/http/handlers/config_handlers.cpp keeps a string-matching fallback for results with error_code == ParameterErrorCode::NONE, documented as backward compatibility with older transports. The shipped Ros2ParameterTransport sets a structured error_code on every failure path, and no other transport exists, so the fallback is dead code.

It is also wrong if ever reached: its substrings do not match the transport's real messages - "Parameter service did not respond for node: ..." matches none of the 503 patterns ("not available", "timed out", "timeout"), and "Parameter not currently set: ..." does not match the 404 patterns, so both would fall through to 400 ERR_INVALID_REQUEST. Either delete the fallback or align it with the real transport messages.

Raised in the PR #540 review discussion: #540

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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