Package com.socrata.model

Examples of com.socrata.model.SodaErrorResponse



   public SodaError(String error)
    {
        super(error);
        this.sodaErrorResponse = new SodaErrorResponse("", error, "", null);
    }
View Full Code Here


    }

    public SodaError(Throwable throwable)
    {
        super(throwable);
        this.sodaErrorResponse = new SodaErrorResponse("", "", "", null);
    }
View Full Code Here

{
    public static final String ERROR_CODE = "client.format.invalidLocation";

    public InvalidLocationError(final String locationSent)
    {
        super(new SodaErrorResponse(ERROR_CODE, "Invalid location from server.", locationSent, null));
    }
View Full Code Here

            throw new LongRunningQueryException(locationUri, parseRetryAfter(retryAfter), ticket);
        }

        if (response.getType() != null && !response.getType().isCompatible(MediaType.APPLICATION_JSON_TYPE)) {
            throw new SodaError(new SodaErrorResponse(UNEXPECTED_ERROR, body, null, null), status);
        }

        SodaErrorResponse sodaErrorResponse;
        if(body.isEmpty()) {
            sodaErrorResponse = new SodaErrorResponse(String.valueOf(status), null, null, null);
        } else {
            try {
                sodaErrorResponse = mapper.readValue(body, SodaErrorResponse.class);
            } catch (Exception e) {
                throw new SodaError(new SodaErrorResponse(MALFORMED_RESPONSE, body, null, null), status);
            }
        }

        switch (status) {
            case 400:
View Full Code Here

TOP

Related Classes of com.socrata.model.SodaErrorResponse

Copyright © 2018 www.massapicom. 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.