Examples of HystrixBadRequestException


Examples of com.netflix.hystrix.exception.HystrixBadRequestException

                    .setCommandPropertiesDefaults(HystrixCommandPropertiesTest.getUnitTestPropertiesSetter().withExecutionIsolationStrategy(ExecutionIsolationStrategy.SEMAPHORE).withExecutionIsolationStrategy(isolationType)));
        }

        @Override
        protected HystrixFuture<Boolean> run() {
            throw new HystrixBadRequestException("Message to developer that they passed in bad data or something like that.");
        }
View Full Code Here

Examples of com.netflix.hystrix.exception.HystrixBadRequestException

        try {
            result = action.execute();
        } catch (CommandActionExecutionException throwable) {
            Throwable cause = throwable.getCause();
            if (isIgnorable(cause)) {
                throw new HystrixBadRequestException(cause.getMessage(), cause);
            }
            if (cause instanceof Exception) {
                throw (Exception) cause;
            } else {
                throw Throwables.propagate(cause);
View Full Code Here

Examples of com.netflix.hystrix.exception.HystrixBadRequestException

                    .setCommandPropertiesDefaults(HystrixCommandPropertiesTest.getUnitTestPropertiesSetter().withExecutionIsolationStrategy(ExecutionIsolationStrategy.SEMAPHORE).withExecutionIsolationStrategy(isolationType)));
        }

        @Override
        protected Observable<Boolean> construct() {
            throw new HystrixBadRequestException("Message to developer that they passed in bad data or something like that.");
        }
View Full Code Here

Examples of com.netflix.hystrix.exception.HystrixBadRequestException

                    .setCommandPropertiesDefaults(HystrixCommandPropertiesTest.getUnitTestPropertiesSetter().withExecutionIsolationStrategy(isolationType)));
        }

        @Override
        protected Boolean run() {
            throw new HystrixBadRequestException("Message to developer that they passed in bad data or something like that.");
        }
View Full Code Here

Examples of com.netflix.hystrix.exception.HystrixBadRequestException

   * 处理异常,对于客户端自己的异常,抛出HystrixBadRequestException,不算入短路统计内。
   */
  protected Exception handleException(HttpStatusCodeException e) {
    HttpStatus status = e.getStatusCode();
    if (status.equals(HttpStatus.BAD_REQUEST)) {
      throw new HystrixBadRequestException(e.getResponseBodyAsString(), e);
    }
    throw e;
  }
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.