Mark response errors from @ExceptionHandler as handled

Also fix a couple of related issues:
- add AsyncRequestNotUsableException to the list of exceptions
that imply response issues.
- handle exceptions from @ExceptionHandler regardless of whether
thrown immediately or via Publisher.

Closes gh-32359
This commit is contained in:
rstoyanchev
2024-03-06 18:01:29 +00:00
parent 0955f541cb
commit 5f601ceb45
5 changed files with 69 additions and 16 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -39,7 +39,8 @@ public class DisconnectedClientHelper {
Set.of("broken pipe", "connection reset by peer");
private static final Set<String> EXCEPTION_TYPE_NAMES =
Set.of("AbortedException", "ClientAbortException", "EOFException", "EofException");
Set.of("AbortedException", "ClientAbortException",
"EOFException", "EofException", "AsyncRequestNotUsableException");
private final Log logger;