Skip to content

GH-1339: Fix RLErrorHandler with Conversion Ex. #1346

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

Merged
merged 1 commit into from
Jun 7, 2021

Conversation

garyrussell
Copy link
Contributor

Resolves #1339

Error handler was not called for conversion exceptions, preventing
the application frm returning some error to the caller for request/reply
processing.

cherry-pick to 2.2.x

Resolves spring-projects#1339

Error handler was not called for conversion exceptions, preventing
the application frm returning some error to the caller for request/reply
processing.

**cherry-pick to 2.2.x**
@artembilan artembilan merged commit 96070f6 into spring-projects:main Jun 7, 2021
artembilan pushed a commit that referenced this pull request Jun 7, 2021
Resolves #1339

Error handler was not called for conversion exceptions, preventing
the application from returning some error to the caller for request/reply processing.

**cherry-pick to 2.2.x**
@artembilan
Copy link
Member

... and cherry-picked to 2.2.x

@garyrussell garyrussell deleted the GH-1339 branch June 8, 2021 13:22
@ThomHurks
Copy link

We just updated to Spring Boot 2.4.7 and tests started to fail related to AMQP. It seems some tests where we expect ListenerExecutionFailedException to be thrown it now throws for MessageConversionException. Looking at the changelog it’s likely caused by this change. Doesn’t that mean this is kind of a breaking change in a patch release? It surprised us at least. We can change the tests to expect a different exception, but didn’t yet verify if this affects runtime behavior in any way.

@garyrussell
Copy link
Contributor Author

Can you provide an example of such a test? Previously, MessageConversionException were thrown to the listener container and bypassed the listener error handler (if one was provided).

I don't see how a LEFE can now become a MCE; l must be missing something in your description.

I do see how an MCE will now be thrown as an LEFE wrapping it, however; so perhaps that's what you meant.

While technically a breaking change; we don't expect user code to be calling the listener adapter directly, but I do see that it could break some test cases if you are testing a listener directly. Sorry for the inconvenience. We should have unwrapped it for MCEs, to retain existing behavior, but I am not sure I want to make another "breaking" change in the next patch release.

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.

MessagingMessageListenerAdapter Skips Error Handler with MessageConversionException
3 participants