Skip to content

Misleading error message when appending queries #414

Open

Description

@tpoliaw

I am using trurl to append fields to a query to avoid url encoding them.

From the reading the man page, not paying enough attention and misinterpreting Long options can be provided either as --flag argument or as --flag=argument and -a, --append [component]=[data], I ran

trurl --url http://localhost:8000 --append query foo=bar

and got the error

trurl error: --append unsupported component: query

While the examples in the docs do use query=key=value, it threw me when it said query wasn't supported. Could the error be something like component query missing data or similar?

Thanks, and thanks for trurl in general, really helpful tool.

Activity

  1. jacobmealey commented on Nov 25, 2025

    @jacobmealey
    Contributor

    Perhaps there should be a hierarchy for some of the errors, where we ensure the flag is formatted properly, something like --append expected '=' after 'query' and then if it knows its in the right form we can make judgements on whether it's supported or not.

  2. rajmodi8905 commented on Oct 9, 2026

    @rajmodi8905

    Hi, I’d like to take this on. I’ve reproduced the misleading message and prepared a small fix that reports a missing = before checking the append component, with regression tests. The available test suite and sanitizer checks pass locally. Please let me know if someone is already working on it.

  3. rajmodi8905 commented on Oct 27, 2026

    @rajmodi8905

    Hi maintainers, the proposed diagnostic fix and regression tests are in #454. I'd appreciate a review when you have a moment, and I'm happy to make any changes needed. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions