From 38a3ffd376a48ceb82383124ebca58be68e1f59f Mon Sep 17 00:00:00 2001 From: Jon Brisbin Date: Tue, 31 Jul 2012 10:25:49 -0500 Subject: [PATCH] Added ConversionFailedException to the list of 400 Bad Request throwables. --- .../data/rest/webmvc/RepositoryRestController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/RepositoryRestController.java b/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/RepositoryRestController.java index 166a624f1..ac3ed38db 100644 --- a/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/RepositoryRestController.java +++ b/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/RepositoryRestController.java @@ -30,6 +30,7 @@ import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; +import org.springframework.core.convert.ConversionFailedException; import org.springframework.core.convert.ConversionService; import org.springframework.dao.OptimisticLockingFailureException; import org.springframework.data.domain.Page; @@ -1384,7 +1385,8 @@ public class RepositoryRestController { InvocationTargetException.class, IllegalArgumentException.class, - ClassCastException.class + ClassCastException.class, + ConversionFailedException.class } ) @ResponseBody