Introduce log statement, to log stacktrace for MultipartExceptions with root cause without a message (#733)
Signed-off-by: Jeroen Laverman <jeroen.laverman@bosch-si.com>
This commit is contained in:
committed by
Dominic Schabel
parent
3eafb29064
commit
16ce2503df
@@ -200,6 +200,12 @@ public class ResponseExceptionHandler {
|
||||
|
||||
final List<Throwable> throwables = ExceptionUtils.getThrowableList(ex);
|
||||
final Throwable responseCause = Iterables.getLast(throwables);
|
||||
|
||||
if (responseCause.getMessage().isEmpty()) {
|
||||
LOG.warn("Request {} lead to MultipartException without root cause message:\n{}", request.getRequestURL(),
|
||||
ex.getStackTrace());
|
||||
}
|
||||
|
||||
final ExceptionInfo response = createExceptionInfo(new MultiPartFileUploadException(responseCause));
|
||||
return new ResponseEntity<>(response, HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user