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

Handle empty reuqest object error explicitly only logging an info message #294

Open
5 tasks
c-pius opened this issue Jun 6, 2024 · 0 comments
Open
5 tasks
Labels
area/quality Related to all activites around quality

Comments

@c-pius
Copy link
Contributor

c-pius commented Jun 6, 2024

The parser throws an error if the request object is nil: https://github.com/kyma-project/runtime-watcher/blob/main/runtime-watcher/internal/requestparser/parser.go#L39

As of now, we record this as an error with log and event: https://github.com/kyma-project/runtime-watcher/blob/main/runtime-watcher/internal/handler.go#L75-L80

The empty request object is an expected condition though. We should rather handle this error explicitly and log it as an info without an event being raised.

AC

  • when an empty request is handled
    • parser throws the error
    • handler handles it explicitly by
      • logging an info like "skipped handling due to empty request object"
      • returning
@c-pius c-pius added the area/quality Related to all activites around quality label Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/quality Related to all activites around quality
Projects
None yet
Development

No branches or pull requests

1 participant