Skip to content

Error message is confusing when piece of query has no data for it or is misspelled  #901

Open
@rylev

Description

@rylev

I ran into an issue where I was querying for "instructions:u" on local data where the instructions data had not been collected (presumably due to missing support in WSL). The error message returned from the API was confusing and didn't help me quickly realize what was happening.

The current error comes directly from the intern crate. It was "ProcessStatistic does not have instructions:u as a valid value". This happens when we try to parse the string "instructions:u" as a ProcessStatistic and there is not interned string.

intern seems to be a fairly independent crate so changing the error message there seems to not be the right move. Instead we can change the error when parsing ProcessStatistic and the other query pieces (using map_err) to something like: "'instructions:u' is not a valid statistic. Ensure that 'instructions:u' is spelled correctly and data related to it has been stored in the database.".

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-improvementThis isn't a feature or a bug fix but makes things betterP-lowLow priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions