Skip to content

logsql: improve regex parsing error message #1425

@hagen1778

Description

@hagen1778

Is your feature request related to a problem? Please describe

Query field:~"(?i)\$" when executed returns the following error message:

cannot parse `query` arg: cannot read regexp for field "field": compound token cannot start with "\""; put it into quotes if needed; context: [field:~"]; query=field:~"(?i)\$"

The message is misleading, as it states that expression starts with ". It is likely because of \ char in the expression parser switches to the "raw" mode and treats " as denied compound token.

Describe the solution you'd like

Error message should be more meaningful for the user.

Describe alternatives you've considered

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions