Examples of toResponse()


Examples of org.apache.hadoop.hdfs.web.resources.ExceptionHandler.toResponse()

          //     {"RemoteException":{"exception":"StandbyException",
          //      "javaClassName":"org.apache.hadoop.ipc.StandbyException",
          //      "message":"Operation category READ is not supported in
          //       state standby"}}
          //
          Response resp = eh.toResponse(oe);
         
          // Mimic the client side logic by parsing the response from server
          //
          Map<?, ?> m = (Map<?, ?>)JSON.parse(resp.getEntity().toString());
          RemoteException re = JsonUtil.toRemoteException(m);
View Full Code Here

Examples of org.mifosplatform.infrastructure.core.exceptionmapper.PlatformApiDataValidationExceptionMapper.toResponse()

            return new ErrorInfo(400, 2001, errorBody);

        } else if (exception instanceof PlatformApiDataValidationException) {

            final PlatformApiDataValidationExceptionMapper mapper = new PlatformApiDataValidationExceptionMapper();
            final String errorBody = jsonHelper.toJson(mapper.toResponse((PlatformApiDataValidationException) exception).getEntity());

            return new ErrorInfo(400, 2002, errorBody);

        } else if (exception instanceof PlatformDataIntegrityException) {
View Full Code Here

Examples of org.mifosplatform.infrastructure.core.exceptionmapper.PlatformDataIntegrityExceptionMapper.toResponse()

            return new ErrorInfo(400, 2002, errorBody);

        } else if (exception instanceof PlatformDataIntegrityException) {

            final PlatformDataIntegrityExceptionMapper mapper = new PlatformDataIntegrityExceptionMapper();
            final String errorBody = jsonHelper.toJson(mapper.toResponse((PlatformDataIntegrityException) exception).getEntity());

            return new ErrorInfo(403, 3001, errorBody);

        } else if (exception instanceof LinkedAccountRequiredException) {
View Full Code Here

Examples of org.mifosplatform.infrastructure.core.exceptionmapper.PlatformDomainRuleExceptionMapper.toResponse()

            return new ErrorInfo(403, 3001, errorBody);

        } else if (exception instanceof LinkedAccountRequiredException) {

            final PlatformDomainRuleExceptionMapper mapper = new PlatformDomainRuleExceptionMapper();
            final String errorBody = jsonHelper.toJson(mapper.toResponse((LinkedAccountRequiredException) exception).getEntity());

            return new ErrorInfo(403, 3002, errorBody);
           
        } else if (exception instanceof MultiDisbursementDataRequiredException) {
View Full Code Here

Examples of org.mifosplatform.infrastructure.core.exceptionmapper.PlatformInternalServerExceptionMapper.toResponse()

            return new ErrorInfo(400, 4001, "{\"Exception\": " + exception.getMessage()+"}");

        } else if (exception instanceof PlatformInternalServerException) {

            final PlatformInternalServerExceptionMapper mapper = new PlatformInternalServerExceptionMapper();
            final String errorBody = jsonHelper.toJson(mapper.toResponse((PlatformInternalServerException) exception).getEntity());

            return new ErrorInfo(500, 5001, errorBody);
        }

        return new ErrorInfo(500, 9999, "{\"Exception\": " + exception.toString() + "}");
View Full Code Here

Examples of org.mifosplatform.infrastructure.core.exceptionmapper.PlatformResourceNotFoundExceptionMapper.toResponse()

        if (exception instanceof AbstractPlatformResourceNotFoundException) {

            final PlatformResourceNotFoundExceptionMapper mapper = new PlatformResourceNotFoundExceptionMapper();
            final String errorBody = jsonHelper
                    .toJson(mapper.toResponse((AbstractPlatformResourceNotFoundException) exception).getEntity());

            return new ErrorInfo(404, 1001, errorBody);

        } else if (exception instanceof UnsupportedParameterException) {
View Full Code Here

Examples of org.mifosplatform.infrastructure.core.exceptionmapper.UnsupportedParameterExceptionMapper.toResponse()

            return new ErrorInfo(404, 1001, errorBody);

        } else if (exception instanceof UnsupportedParameterException) {

            final UnsupportedParameterExceptionMapper mapper = new UnsupportedParameterExceptionMapper();
            final String errorBody = jsonHelper.toJson(mapper.toResponse((UnsupportedParameterException) exception).getEntity());

            return new ErrorInfo(400, 2001, errorBody);

        } else if (exception instanceof PlatformApiDataValidationException) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.