You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@usergrid.apache.org by "Lynch Lee (JIRA)" <ji...@apache.org> on 2015/07/24 17:48:05 UTC
[jira] [Comment Edited] (USERGRID-767) WebApplicationException
[ https://issues.apache.org/jira/browse/USERGRID-767?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14640625#comment-14640625 ]
Lynch Lee edited comment on USERGRID-767 at 7/24/15 3:47 PM:
-------------------------------------------------------------
we can make more descriptions for this exception in class org.apache.usergrid.rest.exceptions.AbstractExceptionMapper:
private Response toResponse( int status, String jsonResponse ) {
if ( status >= 500 ) {
// only log real errors as errors
logger.error( "Server Error (" + status + "):\n" + jsonResponse );
}
String callback = httpServletRequest.getParameter( "callback" );
if ( isJSONP() && isNotBlank( callback ) ) {
jsonResponse = wrapJSONPResponse( callback, jsonResponse );
return Response.status( OK ).type( "application/javascript" ).entity( jsonResponse ).build();
}
else {
return Response.status( status ).type( APPLICATION_JSON_TYPE ).entity( jsonResponse ).build();
}
}
was (Author: lynchlee):
we can make descriptions for this exception in this class org.apache.usergrid.rest.exceptions.AbstractExceptionMapper:
private Response toResponse( int status, String jsonResponse ) {
if ( status >= 500 ) {
// only log real errors as errors
logger.error( "Server Error (" + status + "):\n" + jsonResponse );
}
String callback = httpServletRequest.getParameter( "callback" );
if ( isJSONP() && isNotBlank( callback ) ) {
jsonResponse = wrapJSONPResponse( callback, jsonResponse );
return Response.status( OK ).type( "application/javascript" ).entity( jsonResponse ).build();
}
else {
return Response.status( status ).type( APPLICATION_JSON_TYPE ).entity( jsonResponse ).build();
}
}
> WebApplicationException
> -----------------------
>
> Key: USERGRID-767
> URL: https://issues.apache.org/jira/browse/USERGRID-767
> Project: Usergrid
> Issue Type: Bug
> Reporter: Jeffrey
>
> The following exception is returned for many cases, including a parse error and if an endpoint doesn't support the attempted HTTP method. We need more descriptive messages in these cases.
> {"error":"web_application","timestamp":1435156493000,"duration":0,"exception":"javax.ws.rs.WebApplicationException"}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)