@@ -394,7 +394,7 @@ protected ResponseEntity<Object> handleConversionNotSupported(
394
394
395
395
Object [] args = {ex .getPropertyName (), ex .getValue ()};
396
396
String defaultDetail = "Failed to convert '" + args [0 ] + "' with value: '" + args [1 ] + "'" ;
397
- ProblemDetail body = createProblemDetail (ex , status , headers , defaultDetail , null , args , request );
397
+ ProblemDetail body = createProblemDetail (ex , status , defaultDetail , null , args , request );
398
398
399
399
return handleExceptionInternal (ex , body , headers , status , request );
400
400
}
@@ -419,7 +419,7 @@ protected ResponseEntity<Object> handleTypeMismatch(
419
419
Object [] args = {ex .getPropertyName (), ex .getValue ()};
420
420
String defaultDetail = "Failed to convert '" + args [0 ] + "' with value: '" + args [1 ] + "'" ;
421
421
String messageCode = ErrorResponse .getDefaultDetailMessageCode (TypeMismatchException .class , null );
422
- ProblemDetail body = createProblemDetail (ex , status , headers , defaultDetail , messageCode , args , request );
422
+ ProblemDetail body = createProblemDetail (ex , status , defaultDetail , messageCode , args , request );
423
423
424
424
return handleExceptionInternal (ex , body , headers , status , request );
425
425
}
@@ -441,7 +441,7 @@ protected ResponseEntity<Object> handleTypeMismatch(
441
441
protected ResponseEntity <Object > handleHttpMessageNotReadable (
442
442
HttpMessageNotReadableException ex , HttpHeaders headers , HttpStatusCode status , WebRequest request ) {
443
443
444
- ProblemDetail body = createProblemDetail (ex , status , headers , "Failed to read request" , null , null , request );
444
+ ProblemDetail body = createProblemDetail (ex , status , "Failed to read request" , null , null , request );
445
445
return handleExceptionInternal (ex , body , headers , status , request );
446
446
}
447
447
@@ -462,7 +462,7 @@ protected ResponseEntity<Object> handleHttpMessageNotReadable(
462
462
protected ResponseEntity <Object > handleHttpMessageNotWritable (
463
463
HttpMessageNotWritableException ex , HttpHeaders headers , HttpStatusCode status , WebRequest request ) {
464
464
465
- ProblemDetail body = createProblemDetail (ex , status , headers , "Failed to write request" , null , null , request );
465
+ ProblemDetail body = createProblemDetail (ex , status , "Failed to write request" , null , null , request );
466
466
return handleExceptionInternal (ex , body , headers , status , request );
467
467
}
468
468
@@ -505,12 +505,11 @@ protected ResponseEntity<Object> handleBindException(
505
505
* @since 6.0
506
506
*/
507
507
protected ProblemDetail createProblemDetail (
508
- Exception ex , HttpStatusCode status , @ Nullable HttpHeaders headers ,
509
- String defaultDetail , @ Nullable String detailMessageCode , @ Nullable Object [] detailMessageArguments ,
510
- WebRequest request ) {
508
+ Exception ex , HttpStatusCode status , String defaultDetail , @ Nullable String detailMessageCode ,
509
+ @ Nullable Object [] detailMessageArguments , WebRequest request ) {
511
510
512
511
ErrorResponse errorResponse = ErrorResponse .createFor (
513
- ex , status , headers , defaultDetail , detailMessageCode , detailMessageArguments );
512
+ ex , status , null , defaultDetail , detailMessageCode , detailMessageArguments );
514
513
515
514
return errorResponse .updateAndGetBody (this .messageSource , LocaleContextHolder .getLocale ());
516
515
}
0 commit comments