<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=jmills" rel="nofollow">Justin Mills</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-6752?redirect=false" rel="nofollow">SPR-6752</a></strong> and commented</p>
<p dir="auto">Using RestTemplate to connect to a server that occasionally throws HTTP Status of 420, I am getting IllegalArgumentExceptions when accessing the HttpStatus object in my implementation of the ResponseErrorHandler interface.  When I removed that, and started pulling the status from the Headers directly, RestTemplate started throwing errors due to the logger.warn call in RestTemplate.handleResponseError().  I've gotten around this by not using the HttpStatus enum (getting status from the HttpHeaders directly) and by turning up the log level for RestTemplate to ERROR.  Shouldn't this support any HTTP status value?</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.0 GA</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398116930" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/13707" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/13707/hovercard" href="https://github.com/spring-projects/spring-framework/issues/13707">#13707</a> Implementation of HttpStatus as an enumeration precludes other status codes (<em><strong>"is duplicated by"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398118561" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/13949" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/13949/hovercard" href="https://github.com/spring-projects/spring-framework/issues/13949">#13949</a> In order to handle non standard HTTP Status codes returned by services in RestTemplate, I would like to add support for handling non standard status codes and passing on responses for these responses to callers (<em><strong>"is duplicated by"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398150521" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/14042" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/14042/hovercard" href="https://github.com/spring-projects/spring-framework/issues/14042">#14042</a> Unknown status codes (i.e. not in HttpStatus enum) prevent HttpClientErrorException and HttpServerErrorExceptions from being raised</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398215663" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/20529" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/20529/hovercard" href="https://github.com/spring-projects/spring-framework/issues/20529">#20529</a> RestTemplate doesn't consistently tolerate unknown HTTP status codes</li>
</ul>
<p dir="auto"><strong>Referenced from:</strong> commits <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/68b4c7df6efedb03849cc15525eadb871f520382/hovercard" href="https://github.com/spring-projects/spring-framework/commit/68b4c7df6efedb03849cc15525eadb871f520382"><tt>68b4c7d</tt></a></p>
<p dir="auto"><strong>Backported to:</strong> <a href="https://github.com/spring-projects/spring-framework/milestone/68?closed=1">3.0.1</a></p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=skaffman" rel="nofollow">Kenny MacLeod</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-4235?redirect=false" rel="nofollow">SPR-4235</a></strong> and commented</p>
<p dir="auto">When I use the new <code class="notranslate">@Controller</code> and <code class="notranslate">@RequestMapping</code> annotations, and the target method throws an Exception, it isn't reported very well by the framework.</p>
<p dir="auto">Take this example stack trace fragment, caused by an IOException theown by my controller:</p>
<p dir="auto">java.lang.IllegalStateException: Unexpected exception thrown by method - java.io.FileNotFoundException: \tmp\2007\10\csv\top_100_stops_wap.csv (The system cannot find the path specified)<br>
at org.springframework.util.ReflectionUtils.handleInvocationTargetException(ReflectionUtils.java:210)<br>
at org.springframework.util.ReflectionUtils.handleReflectionException(ReflectionUtils.java:190)<br>
at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:168)<br>
at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:245)<br>
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:874)<br>
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:808)</p>
<p dir="auto">You get the message text of the original exception, but the stack trace isn't much use for diagnosing the problem.</p>
<p dir="auto">Can ReflectionUtils be modified to propagate or log the original exception?</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.5 final</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398084608" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/9014" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/9014/hovercard" href="https://github.com/spring-projects/spring-framework/issues/9014">#9014</a> {portlet-mvc, annotation based} SimpleMappingingExceptionResolver does not handle caught exceptions correctly (<em><strong>"is duplicated by"</strong></em>)</li>
</ul>