Skip to content

Preserve original headers in DefaultErrorMessageStrategy - #11160

Merged
artembilan merged 1 commit into
spring-projects:mainfrom
mjd507:error-message-user-headers-missing
Aug 4, 2026
Merged

Preserve original headers in DefaultErrorMessageStrategy#11160
artembilan merged 1 commit into
spring-projects:mainfrom
mjd507:error-message-user-headers-missing

Conversation

@mjd507

@mjd507 mjd507 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

When setup RequestHandlerRetryAdvice with a recover ErrorMessageSendingRecoverer, after retry exhausted, the DefaultErrorMessageStrategy will build a ErrorMessage, however it does not copy the original message headers.

because I need the header values to do the error routing, so I think it is useful to keep it.

@artembilan artembilan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@mjd507 ,

We have switched recently to 7.2.
Please, consider to add a whats-new note into that General Changes sections.

Thanks

Signed-off-by: Jiandong Ma <jiandong.ma.cn@gmail.com>
@mjd507
mjd507 force-pushed the error-message-user-headers-missing branch from ea8e69d to 00b9129 Compare August 4, 2026 02:10
@mjd507 mjd507 changed the title Keep original headers when build ErrorMessage in DefaultErrorMessageStrategy Aug 4, 2026
@mjd507
mjd507 requested a review from artembilan August 4, 2026 06:05
@artembilan
artembilan enabled auto-merge (squash) August 4, 2026 14:18
@artembilan
artembilan merged commit ed40f2b into spring-projects:main Aug 4, 2026
3 of 5 checks passed
@mjd507
mjd507 deleted the error-message-user-headers-missing branch August 5, 2026 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment