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

Make LogContextPipe not throw when it has an error during execution #6172

Merged
merged 6 commits into from
Feb 15, 2024

Conversation

tnleeuw
Copy link
Contributor

@tnleeuw tnleeuw commented Jan 26, 2024

No description provided.

} catch (ParameterException e) {
throw new PipeRunException(this, "exception extracting parameters", e);
} catch (Exception e) {
log.debug("Exception getting parameter values. Ignoring.", e);
Copy link
Contributor

Choose a reason for hiding this comment

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

Could this be changed to a warn statement?

If you see this a lot in production, something might be wrongly/sub-optimal configured..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was doubting because some messages we did make warnings, turned out to be excessive without pointing to any kind of misconfiguration.
But in this case you're probably right.

} catch (ParameterException e) {
throw new PipeRunException(this, "exception extracting parameters", e);
} catch (Exception e) {
log.warn("Exception getting parameter values. Ignoring.", e);
Copy link
Contributor

Choose a reason for hiding this comment

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

Just wondering if this is enough info for the end user (integration specialist) to understand/find the configuration which is wrong. @Laurens-makel what is your opinion?

Copy link
Sponsor Member

Choose a reason for hiding this comment

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

I think the short answer here would be no. And than I would also like to propose an option to use the exception forward by default unless an additional property or setting has been set.

Copy link
Contributor

Choose a reason for hiding this comment

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

Depends on what is in e... Does it mention which parameter caused the exception?

Copy link
Contributor

@jkosternl jkosternl Jan 27, 2024

Choose a reason for hiding this comment

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

Depends on what is in e... Does it mention which parameter caused the exception?

No, it only mentions the stacktrace, which isn't helping.

Comment on lines 60 to 62
if (!message.isRepeatable()) {
message.preserve();
}
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

Dit is onderdeel van de ParameterValueList en hoeft hier niet.

} catch (ParameterException e) {
throw new PipeRunException(this, "exception extracting parameters", e);
} catch (Exception e) {
log.warn("Exception getting parameter values. Ignoring.", e);
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

I think the short answer here would be no. And than I would also like to propose an option to use the exception forward by default unless an additional property or setting has been set.

Add `parameterName` to the ParameterException so that we can start reporting explicitly on the parameter that caused an error.
@tnleeuw tnleeuw requested review from jkosternl, nielsm5 and Laurens-makel and removed request for Yale96 February 14, 2024 08:33
@nielsm5 nielsm5 merged commit e999f95 into 7.9-release Feb 15, 2024
8 of 9 checks passed
@nielsm5 nielsm5 deleted the issue/7.9/6165_LogContextPipeShouldNotThrow branch February 15, 2024 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants