Skip to content

[BUG] Grok command should raise better error when invalid regex is specified #966

Open
@ykmr1224

Description

@ykmr1224

What is the bug?
When invalid regex is specified with Grok command, it raises raw error from Pattern.compile, but it should raise better error.

How can one reproduce the bug?
Steps to reproduce the behavior:
query: source=src | grok message 'updateStatus: updateStatus)'
error: java.util.regex.PatternSyntaxException: Unmatched closing ')' near index 26

What is the expected behavior?
It should raise error something like: `Invalid pattern specified to grok command: Unmatched closing ')' near index 26``

What is your host/environment?
Checked behavior with testSuite

Do you have any screenshots?
n/a

Do you have any additional context?
Check other command which use regex and fix in the same way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Lang:PPLPipe Processing Language supportbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions