WIP: Update morefiles #152

Closed
RecentRunner wants to merge 183 commits from main into morefiles
Showing only changes of commit 26f9f8c0d8 - Show all commits

View File

@@ -5,6 +5,7 @@ import jakarta.servlet.http.HttpServletRequest;
import org.springframework.dao.DataIntegrityViolationException;
import org.springframework.data.core.PropertyReferenceException;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.FieldError;
import org.springframework.web.HttpRequestMethodNotSupportedException;
@@ -118,7 +119,9 @@ public class GlobalExceptionHandler {
request.getRequestURI(),
LocalDateTime.now()
);
return ResponseEntity.status(status).body(error);
return ResponseEntity.status(status)
.contentType(MediaType.APPLICATION_JSON)
.body(error);
}
private String buildDetails(Exception ex) {