if (code == 0){\r
code = Response.Status.BAD_REQUEST.getStatusCode();\r
}\r
- return new WebApplicationException(e, code);\r
+ // CSPACE-1110\r
+ response = Response.status(code).entity(serviceMsg + e.getMessage()).type("text/plain").build();\r
+ // return new WebApplicationException(e, code);\r
+ return new WebApplicationException(response);\r
\r
} else if (e instanceof DocumentException){\r
int code = ((DocumentException) e).getErrorCode();\r
if (code == 0){\r
code = Response.Status.BAD_REQUEST.getStatusCode();\r
}\r
- return new WebApplicationException(e, code);\r
-\r
+ // CSPACE-1110\r
+ response = Response.status(code).entity(serviceMsg + e.getMessage()).type("text/plain").build();\r
+ // return new WebApplicationException(e, code);\r
+ return new WebApplicationException(response);\r
+ \r
} else if (e instanceof WebApplicationException) {\r
// subresource may have already thrown this exception\r
// so just pass it on\r