Examples of InvalidRequestException


Examples of ca.uhn.fhir.rest.server.exceptions.InvalidRequestException

      if (tok.hasMoreTokens()) {
        String nextString = tok.nextToken();
        if (nextString.startsWith("_")) {
          if (operation != null) {
            throw new InvalidRequestException("URL Path contains two operations (part beginning with _): " + requestPath);
          }
          operation = nextString;
        }
      }
View Full Code Here

Examples of ca.uhn.model.json.exception.InvalidRequestException

      if (error.code == Error.INTERNAL_ERROR) {
        throw new InternalErrorException(serviceError);
      } else if (error.code == Error.INVALID_PARAMS) {
        throw new InvalidParamsException(serviceError);
      } else if (error.code == Error.INVALID_REQUEST) {
        throw new InvalidRequestException(serviceError);
      } else if (error.code == Error.METHOD_NOT_FOUND) {
        throw new MethodNotFoundException(serviceError);
      } else if (error.code == Error.LIMIT_REACHED_ERROR) {
        throw new LimitReachedException(serviceError);
      } else if (error.code == Error.AUTHORIZATION_ERROR) {
View Full Code Here

Examples of com.amazonaws.services.datapipeline.model.InvalidRequestException

        // marshaller understands.
        String errorCode = parseErrorCode(json);
        if (errorCode == null || !errorCode.equals("InvalidRequestException"))
            return null;

        InvalidRequestException e = (InvalidRequestException)super.unmarshall(json);

        return e;
    }
View Full Code Here

Examples of com.amazonaws.services.elasticmapreduce.model.InvalidRequestException

        // marshaller understands.
        String errorCode = parseErrorCode(json);
        if (errorCode == null || !errorCode.equals("InvalidRequestException"))
            return null;

        InvalidRequestException e = (InvalidRequestException)super.unmarshall(json);

        e.setErrorCode(parseMember("ErrorCode", json));
       
        return e;
    }
View Full Code Here

Examples of com.bluetangstudio.searchcloud.client.exception.InvalidRequestException

    @DataProvider(name = "positive")
    public Object[][] getTestData() {
        return new Object[][] {
                new Object[] { new ServiceException("abc"),
                        "{\"code\":\"SERVICE_EXCEPTION\",\"message\":\"abc\",\"status\":\"INTERNAL_SERVER_ERROR\"}" },
                new Object[] { new InvalidRequestException("abc"),
                        "{\"code\":\"INVALID_REQUEST\",\"message\":\"abc\",\"status\":\"BAD_REQUEST\"}" },
                new Object[] { new QuerySyntaxException("abc"),
                        "{\"code\":\"INVALID_QUERY_SYNTAX\",\"message\":\"abc\",\"status\":\"BAD_REQUEST\"}" },
                new Object[] { new OverQuotaException("abc"),
                        "{\"code\":\"OVER_QUOTA_LIMIT\",\"message\":\"abc\",\"status\":\"UNAUTHORIZED\"}" },
View Full Code Here

Examples of com.coherentlogic.wb.client.core.exceptions.InvalidRequestException

            ErrorMessage errorMessage = (ErrorMessage) result;

            Message message = errorMessage.getMessage();

            throw new InvalidRequestException(message);
        }
        return result;
    }
View Full Code Here

Examples of com.google.wave.api.InvalidRequestException

  public void testDeserializationFailsSafely() throws Exception {
    when(serializer.serialize(BUNDLE, PROTOCOL_VERSION)).thenReturn(SERIALIZED_BUNDLE);
    when(connection.postJson(TEST_RPC_ENDPOINT, SERIALIZED_BUNDLE)).thenReturn(RETURNED_OPERATION);
    when(serializer.deserializeOperations(RETURNED_OPERATION)).thenThrow(
        new InvalidRequestException("Invalid Request"));

    List<OperationRequest> operations =
        connector.sendMessageBundle(BUNDLE, robot, PROTOCOL_VERSION);
    assertTrue("Expected no operations to be returned", operations.isEmpty());
  }
View Full Code Here

Examples of com.google.wave.api.InvalidRequestException

  public void testExecuteOperationsSetsErrorOnInvalidRequestException() throws Exception {
    String operationId = "op1";
    OperationRequest operation = new OperationRequest("wavelet.create", operationId);

    OperationService service =
        mock(OperationService.class, new ThrowsException(new InvalidRequestException("")));
    when(operationRegistry.getServiceFor(any(OperationType.class))).thenReturn(service);

    OperationUtil.executeOperation(operation, operationRegistry, context, ALEX);

    assertTrue("Expected one response", context.getResponses().size() == 1);
View Full Code Here

Examples of com.maxmind.geoip2.exception.InvalidRequestException

        } else if (code.equals("OUT_OF_QUERIES")) {
            throw new OutOfQueriesException(error);
        }

        // These should be fairly rare
        throw new InvalidRequestException(error, code, uri.toURL());
    }
View Full Code Here

Examples of com.rackspacecloud.blueflood.exceptions.InvalidRequestException

                        params.getRange().getStop(), params.getPoints(), params.getStats());
            } else if (params.isGetByResolution()) {
                metricData = GetDataByResolution(tenantId, metricName, params.getRange().getStart(),
                        params.getRange().getStop(), params.getResolution(), params.getStats());
            } else {
                throw new InvalidRequestException("Invalid rollups query. Neither points nor resolution specified.");
            }

            final JsonElement element = parser.parse(metricData.toString());
            final String jsonStringRep = gson.toJson(element);
            sendResponse(ctx, request, jsonStringRep, HttpResponseStatus.OK);
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.