Examples of BadRequestException


Examples of br.com.caelum.restfulie.http.error.BadRequestException

      throw new RedicetionException("Http error " + code
          + " when executing request");
    }

    if (code == 400) {
      throw new BadRequestException("Http error " + code
          + " when executing request");
    }

    if (code == 401) {
      throw new UnauthorizedException("Http error " + code
View Full Code Here

Examples of br.gov.frameworkdemoiselle.BadRequestException

    bc.delete(ids);
  }

  private void checkId(Bookmark entity) {
    if (entity.getId() != null) {
      throw new BadRequestException();
    }
  }
View Full Code Here

Examples of co.cask.cdap.client.exception.BadRequestException

  public void create(String newStreamId) throws IOException, BadRequestException, UnAuthorizedAccessTokenException {
    URL url = config.resolveURL(String.format("streams/%s", newStreamId));
    HttpResponse response = restClient.execute(HttpMethod.PUT, url, config.getAccessToken(),
                                               HttpURLConnection.HTTP_BAD_REQUEST);
    if (response.getResponseCode() == HttpURLConnection.HTTP_BAD_REQUEST) {
      throw new BadRequestException("Bad request: " + response.getResponseBodyAsString());
    }
  }
View Full Code Here

Examples of com.alibaba.citrus.webx.BadRequestException

    @Test
    public void valve_bad_request_exception() throws Exception {
        TestValve.runnerHolder.set(new ValveRunner() {
            public void run(RunData rundata, PipelineContext pipelineContext) throws Exception {
                throw new BadRequestException("bad request!");
            }
        });

        invokeServlet("/myapps/app1/test.htm");
View Full Code Here

Examples of com.boundlessgeo.geoserver.api.exceptions.BadRequestException

        CoordinateReferenceSystem crs = null;
        try {
            crs = Proj.get().crs(srs);
        }
        catch(Exception e1) {
            throw new BadRequestException("Bad srs: " + srs, e1);
        }

        if (crs == null) {
            throw new NotFoundException("No such projection: " + srs);
        }
View Full Code Here

Examples of com.bradmcevoy.http.exceptions.BadRequestException

      file.setParent(getKey(((FolderResource) toCollection).getFolder()));
      ofy.put(file);
      return;
    }
   
    throw new BadRequestException(this, "Cannot be copied to " + toCollection.toString());
  }
View Full Code Here

Examples of com.caucho.server.dispatch.BadRequestException

    }
    else if (_hostHeader != null) {
      _host = _hostHeader;
    }
    else if (HTTP_1_1 <= getVersion())
      throw new BadRequestException("HTTP/1.1 requires a Host header (Remote IP=" + getRemoteHost() + ")");

    return _host;
  }
View Full Code Here

Examples of com.cloudesire.tisana4j.exceptions.BadRequestException

    EntityUtils.consumeQuietly(response.getEntity());
    String allow = null;
    Header[] allHeaders = response.getAllHeaders();
    for (int i = 0; i < allHeaders.length; i++)
      if (allHeaders[i].getName() == "Allow") allow = allHeaders[i].getValue();
    if (allow == null) throw new BadRequestException(404,"Method options not supported.");
    return allow.split(",");
  }
View Full Code Here

Examples of com.createsend.util.exceptions.BadRequestException

   
    private <T> CreateSendException handleAPIErrorResponse(
        Status responseStatus, ApiErrorResponse<T> apiResponse) {
        switch(responseStatus) {
          case BAD_REQUEST:
              return new BadRequestException(apiResponse.Code, apiResponse.Message, apiResponse.ResultData);
          case INTERNAL_SERVER_ERROR:
              return new ServerErrorException(apiResponse.Code, apiResponse.Message);
          case NOT_FOUND:
              return new NotFoundException(apiResponse.Code, apiResponse.Message);
          case UNAUTHORIZED:
View Full Code Here

Examples of com.dotcms.repackage.com.bradmcevoy.http.exceptions.BadRequestException

                    throw new RedirectException(result, href);
            }
        } else if (result >= 400 && result < 500) {
            switch (result) {
                case 400:
                    throw new BadRequestException(href);
                case 401:
                    throw new NotAuthorizedException(href,null);
                case 403:
                    throw new NotAuthorizedException(href,null);
                case 404:
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.