Examples of ErrorType


Examples of com.elastisys.scale.commons.rest.types.ErrorType

  public Response getConfigurationSchema() {
    log.info("GET /config/schema");
    Optional<JsonObject> schema = this.cloudAdapter
        .getConfigurationSchema();
    if (!schema.isPresent()) {
      ErrorType entity = new ErrorType(
          "cloud adapter does not publish a configuration schema");
      return Response.status(Status.NOT_FOUND).entity(entity).build();

    }
    return Response.ok(schema.get()).build();
View Full Code Here

Examples of com.elastisys.scale.commons.rest.types.ErrorType

    log.info("GET /config");
    try {
      Optional<JsonObject> configuration = this.cloudAdapter
          .getConfiguration();
      if (!configuration.isPresent()) {
        ErrorType entity = new ErrorType(
            "no cloud adapter configuration has been set");
        return Response.status(Status.NOT_FOUND).entity(entity).build();
      }
      return Response.ok(configuration.get()).build();
    } catch (Exception e) {
      String message = "failure to process config get request: "
          + e.getMessage();
      log.error(message, e);
      return Response.status(Status.INTERNAL_SERVER_ERROR)
          .entity(new ErrorType(message, e)).build();
    }
  }
View Full Code Here

Examples of com.elastisys.scale.commons.rest.types.ErrorType

      return Response.ok().build();
    } catch (IllegalArgumentException e) {
      String message = "illegal input: " + e.getMessage();
      log.error(message, e);
      return Response.status(Status.BAD_REQUEST)
          .entity(new ErrorType(message, e)).build();
    } catch (Exception e) {
      String message = "failure to process config set request: "
          + e.getMessage();
      log.error(message, e);
      return Response.status(Status.INTERNAL_SERVER_ERROR)
          .entity(new ErrorType(message, e)).build();
    }
  }
View Full Code Here

Examples of com.elastisys.scale.commons.rest.types.ErrorType

    } catch (Exception e) {
      String message = "failure to process pool get request: "
          + e.getMessage();
      log.error(message, e);
      return Response.status(Status.INTERNAL_SERVER_ERROR)
          .entity(new ErrorType(message, e)).build();
    }
  }
View Full Code Here

Examples of com.elastisys.scale.commons.rest.types.ErrorType

      return Response.ok().build();
    } catch (IllegalArgumentException e) {
      String message = "illegal input: " + e.getMessage();
      log.error(message, e);
      return Response.status(Status.BAD_REQUEST)
          .entity(new ErrorType(message, e)).build();
    } catch (Exception e) {
      String message = "failure to process pool resize request: "
          + e.getMessage();
      log.error(message, e);
      return Response.status(Status.INTERNAL_SERVER_ERROR)
          .entity(new ErrorType(message, e)).build();
    } finally {
      log.debug("Finished handling POST /pool");
      this.lock.unlock();
    }
View Full Code Here

Examples of com.elastisys.scale.commons.rest.types.ErrorType

          "failed to parse JSON object: entity stream is empty");
      return JsonUtils.parseJsonString(entity);
    } catch (IllegalArgumentException e) {
      // produce a 400 http response
      throw new WebApplicationException(e, Response
          .status(Status.BAD_REQUEST).entity(new ErrorType(e))
          .build());
    } catch (JsonParseException e) {
      // produce a 400 http response
      throw new WebApplicationException(e, Response
          .status(Status.BAD_REQUEST).entity(new ErrorType(e))
          .build());
    }
  }
View Full Code Here

Examples of com.linkedin.helix.messaging.handling.MessageHandler.ErrorType

    }

    HelixTaskResult taskResult = new HelixTaskResult();

    Exception exception = null;
    ErrorType type = ErrorType.INTERNAL;
    ErrorCode code = ErrorCode.ERROR;

    long start = System.currentTimeMillis();
    logger.info("msg:" + _message.getMsgId() + " handling task begin, at: " + start);
    HelixDataAccessor accessor = _manager.getHelixDataAccessor();
View Full Code Here

Examples of com.linkedin.helix.messaging.handling.MessageHandler.ErrorType

    }

    HelixTaskResult taskResult = new HelixTaskResult();

    Exception exception = null;
    ErrorType type = ErrorType.INTERNAL;
    ErrorCode code = ErrorCode.ERROR;

    long start = System.currentTimeMillis();
    logger.info("msg:" + _message.getMsgId() + " handling task begin, at: "
        + start);
View Full Code Here

Examples of eBLBaseComponents.apis.ebay.ErrorType

   * @param _response
   */
  public static final void processResponse(AbstractResponseType _response) {
    if (_response.getErrors() != null && _response.getErrors().length > 0) {
      for (int i = 0; i < _response.getErrors().length; i++) {
        ErrorType error = _response.getErrors(i);
        if (error.getSeverityCode().equals(SeverityCodeType.Warning) && LOG.isWarnEnabled()) {
          LOG.warn(new StringBuffer("Warning processing PayPal Request: ").append(error.getShortMessage()).append(" - ").append(error.getLongMessage()).append(" (").append(error.getErrorCode().toString()).append(")").toString());
        }
        else if (LOG.isErrorEnabled()) {
          LOG.error(new StringBuffer("Error processing PayPal Request: ").append(error.getShortMessage()).append(" - ").append(error.getLongMessage()).append(" (").append(error.getErrorCode().toString()).append(")").toString());
        }
      }
    }

  }
View Full Code Here

Examples of edu.brown.benchmark.seats.util.ErrorType

                SEATSClient.this.requeueReservation(element);
            }
            // Aborted - Figure out why!
            else if (clientResponse.getStatus() == Status.ABORT_USER) {
                String msg = clientResponse.getStatusString();
                ErrorType errorType = ErrorType.getErrorType(msg);
               
                if (debug.val)
                    LOG.debug(String.format("Client %02d :: NewReservation %s [ErrorType=%s] - %s",
                              getClientId(), clientResponse.getStatus(), errorType, clientResponse.getStatusString()),
                              clientResponse.getException());
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.