You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Lorenz Quack (JIRA)" <ji...@apache.org> on 2017/03/22 11:03:41 UTC

[jira] [Commented] (QPID-7719) [Java Broker] Set response code to 500 when unexpected error occurs during REST call

    [ https://issues.apache.org/jira/browse/QPID-7719?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15936118#comment-15936118 ] 

Lorenz Quack commented on QPID-7719:
------------------------------------

Furthermore, it seems that the responsibilities between {{RestServlet#setResponseStatus}} and the {{ExceptionHandlingFilter}} are unclear. For example the handling of {{ExternalServiceTimeoutException}} seems to be duplicated.
IMHO, {{RestServlet#setResponseStatus}} should die and the functionality be moved into the {{ExceptionHandlingFilter}}.

> [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
>
> 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: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org