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

Reduce noise from fuzzing, or various unexpected inputs #68

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

robotdan
Copy link
Member

@robotdan robotdan commented Jan 22, 2025

Reduce noise from fuzzing, or various unexpected inputs that may cause message lookup to fail when no action invocation exists.

Fixes #67

…e message lookup to fail when no action invocation exists.
@@ -79,7 +79,8 @@ public String getMessage(String key, Object... values) throws MissingMessageExce
String message = getOptionalMessage(key, values);
if (message == null) {
ActionInvocation actionInvocation = invocationStore.getCurrent();
throw new MissingMessageException("Message could not be found for the URI [" + actionInvocation.actionURI + "] and key [" + key + "]");
String uri = actionInvocation != null ? actionInvocation.actionURI : null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From looking at this and playing w/ it locally, it looks like the source of noise was from NPEs, which this 'solves', right?

Copy link
Member Author

@robotdan robotdan Jan 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. It does solve the NPE.

I suppose we could also consider not logging this message at all if there is no action invocation. But my primary goal was to remove the NPE I saw in some customer logs.

@robotdan robotdan merged commit 95ee8cf into master Jan 23, 2025
2 checks passed
@robotdan robotdan deleted the degroff/fuzzing_noise branch January 23, 2025 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

actionURI may be null and causes noise in the logs during findMessage
2 participants