[
https://issues.apache.org/jira/browse/QPID-7719?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15979055#comment-15979055
]
Keith Wall commented on QPID-7719:
----------------------------------
I agree with Lorenz's first point, sending the error first seems like the best
idea and in which case the call to the handler should be moved into a
{{finally}}. On his second, I prefer the {{throw e}} to remain - we don't
know that the handler will shutdown the JVM. In an embedded case, so one may
create there own handle to do something else.
> [Java Broker] Set response code to 500 when unexpected error occurs during
> REST call
> -------------------------------------------------------------------------------------
>
> Key: QPID-7719
> URL: https://issues.apache.org/jira/browse/QPID-7719
> Project: Qpid
> Issue Type: Bug
> Components: Java Broker
> Reporter: Lorenz Quack
> Assignee: Alex Rudyy
> Fix For: qpid-java-broker-7.0.0
>
> Attachments:
> 0001-QPID-7719-Rethrow-fatal-exceptions-from-ExceptionHan.patch,
> TEST-org.apache.qpid.systest.rest.VirtualHostRestTest.testCreateProvidedVirtualHost.txt
>
>
> Currently if there is an unhandled exception in the REST layer we do not set
> a error response code. The servlet ends up returning 200 which is clearly
> incorrect.
> we should set the error code to 500 and ideally return a JSON error message.
> The code in question is the final {{else}} block in
> {{RestServlet#setResponseStatus}} (~line 960).
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]