Repository: stratos Updated Branches: refs/heads/master a2e1aa305 -> 48b99b852
Changing default error code thrown for RestAPIException to 500 Project: http://git-wip-us.apache.org/repos/asf/stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/3206fe7c Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/3206fe7c Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/3206fe7c Branch: refs/heads/master Commit: 3206fe7c60105536e3080be85b039300fc765cf6 Parents: a9d8188 Author: Lahiru Sandaruwan <[email protected]> Authored: Tue Apr 28 15:23:42 2015 +0530 Committer: Lahiru Sandaruwan <[email protected]> Committed: Wed Apr 29 15:38:08 2015 +0530 ---------------------------------------------------------------------- .../stratos/rest/endpoint/handlers/CustomExceptionMapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/stratos/blob/3206fe7c/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/handlers/CustomExceptionMapper.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/handlers/CustomExceptionMapper.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/handlers/CustomExceptionMapper.java index 759cc20..062a153 100644 --- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/handlers/CustomExceptionMapper.java +++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/handlers/CustomExceptionMapper.java @@ -43,7 +43,7 @@ public class CustomExceptionMapper implements ExceptionMapper<RestAPIException> restAPIException.getMessage() : "Error while fulfilling the request"; // if no specific error specified we are throwing the bad request http status code by default Response.Status httpStatus = (restAPIException.getHTTPStatusCode() != null) ? - restAPIException.getHTTPStatusCode() : Response.Status.BAD_REQUEST; + restAPIException.getHTTPStatusCode() : Response.Status.INTERNAL_SERVER_ERROR; log.error(errorMessage, restAPIException); return Response.status(httpStatus.getStatusCode()).type(MediaType.APPLICATION_JSON).
