Minor refactoring after recent commits
See gh-29384
This commit is contained in:
@@ -306,12 +306,11 @@ public abstract class ResponseEntityExceptionHandler implements MessageSourceAwa
|
||||
* @return the created {@code ProblemDetail} instance
|
||||
*/
|
||||
protected ProblemDetail createProblemDetail(
|
||||
Exception ex, HttpStatusCode status, @Nullable HttpHeaders headers,
|
||||
String defaultDetail, @Nullable String detailMessageCode, @Nullable Object[] detailMessageArguments,
|
||||
ServerWebExchange exchange) {
|
||||
Exception ex, HttpStatusCode status, String defaultDetail, @Nullable String detailMessageCode,
|
||||
@Nullable Object[] detailMessageArguments, ServerWebExchange exchange) {
|
||||
|
||||
ErrorResponse response = ErrorResponse.createFor(
|
||||
ex, status, headers, defaultDetail, detailMessageCode, detailMessageArguments);
|
||||
ex, status, null, defaultDetail, detailMessageCode, detailMessageArguments);
|
||||
|
||||
return response.updateAndGetBody(this.messageSource, getLocale(exchange));
|
||||
}
|
||||
|
||||
@@ -279,7 +279,7 @@ public class ResponseEntityExceptionHandlerTests {
|
||||
|
||||
public Mono<ResponseEntity<Object>> handleException(IllegalStateException ex, ServerWebExchange exchange) {
|
||||
HttpStatus status = HttpStatus.INTERNAL_SERVER_ERROR;
|
||||
ProblemDetail body = createProblemDetail(ex, status, null, ex.getMessage(), null, new Object[] {"A"}, exchange);
|
||||
ProblemDetail body = createProblemDetail(ex, status, ex.getMessage(), null, new Object[] {"A"}, exchange);
|
||||
return handleExceptionInternal(ex, body, null, status, exchange);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user