Repository: incubator-usergrid Updated Branches: refs/heads/master 0254ee828 -> ab9fdf2e5 refs/pull/27/head 46dbb163e -> b309e5e74 refs/pull/27/merge [deleted] a0a1c2608 refs/pull/60/merge [deleted] 6704cb838 refs/pull/70/merge 8206b107e -> e378301e6 (forced update)
removed vague stack trace from Server Error. Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/11b235be Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/11b235be Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/11b235be Branch: refs/heads/master Commit: 11b235be46a369b2ee72f85062063ce2db482bd2 Parents: c7553a3 Author: grey <[email protected]> Authored: Fri Feb 28 12:17:45 2014 -0800 Committer: grey <[email protected]> Committed: Fri Feb 28 12:17:45 2014 -0800 ---------------------------------------------------------------------- .../organizations/applications/ApplicationResource.java | 6 +++++- .../apache/usergrid/management/export/ExportServiceImpl.java | 7 +------ 2 files changed, 6 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/11b235be/stack/rest/src/main/java/org/apache/usergrid/rest/management/organizations/applications/ApplicationResource.java ---------------------------------------------------------------------- diff --git a/stack/rest/src/main/java/org/apache/usergrid/rest/management/organizations/applications/ApplicationResource.java b/stack/rest/src/main/java/org/apache/usergrid/rest/management/organizations/applications/ApplicationResource.java index 4187e3e..158991a 100644 --- a/stack/rest/src/main/java/org/apache/usergrid/rest/management/organizations/applications/ApplicationResource.java +++ b/stack/rest/src/main/java/org/apache/usergrid/rest/management/organizations/applications/ApplicationResource.java @@ -284,7 +284,11 @@ public class ApplicationResource extends AbstractContextResource { catch ( Exception e ) { //TODO:throw descriptive error message and or include on in the response //TODO:fix below, it doesn't work if there is an exception. Make it look like the OauthResponse. - return Response.status( SC_INTERNAL_SERVER_ERROR ).build(); + OAuthResponse errorMsg = + OAuthResponse.errorResponse( SC_INTERNAL_SERVER_ERROR ).setErrorDescription( e.getMessage() ) + .buildJSONMessage(); + return Response.status( errorMsg.getResponseStatus() ).type( JSONPUtils.jsonMediaType( callback ) ) + .entity( ServiceResource.wrapWithCallback( errorMsg.getBody(), callback ) ).build(); } return Response.status( SC_ACCEPTED ).entity( uuidRet ).build(); http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/11b235be/stack/services/src/main/java/org/apache/usergrid/management/export/ExportServiceImpl.java ---------------------------------------------------------------------- diff --git a/stack/services/src/main/java/org/apache/usergrid/management/export/ExportServiceImpl.java b/stack/services/src/main/java/org/apache/usergrid/management/export/ExportServiceImpl.java index f0fa965..f5cc642 100644 --- a/stack/services/src/main/java/org/apache/usergrid/management/export/ExportServiceImpl.java +++ b/stack/services/src/main/java/org/apache/usergrid/management/export/ExportServiceImpl.java @@ -141,6 +141,7 @@ public class ExportServiceImpl implements ExportService { em.update( export ); if ( config.getCollection() == null ) { + //exports all the applications for a given organization. Map<UUID, String> organizations = getOrgs(); for ( Map.Entry<UUID, String> organization : organizations.entrySet() ) { try { @@ -229,12 +230,6 @@ public class ExportServiceImpl implements ExportService { this.managementService = managementService; } - - //write test checking to see what happens if the input stream is closed or wrong. - //TODO: make multipart streaming functional - //currently only stores the collection in memory then flushes it. - - /** * Exports all applications for the given organization. * @param organization
