Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ykmr1224 opened this issue Dec 4, 2024 · 2 comments
Labels
bug Something isn't working Lang:PPL Pipe Processing Language support

Comments

@ykmr1224
Copy link
Collaborator

ykmr1224 commented Dec 4, 2024

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.

@ykmr1224 ykmr1224 added bug Something isn't working untriaged labels Dec 4, 2024
@anasalkouz anasalkouz added Lang:PPL Pipe Processing Language support and removed untriaged labels Dec 24, 2024
@anasalkouz
Copy link
Member

@YANG-DB can you please look into this?

@YANG-DB
Copy link
Member

YANG-DB commented Dec 24, 2024

Yes thank you for raising this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Lang:PPL Pipe Processing Language support
Projects
None yet
Development

No branches or pull requests

3 participants