Examples of BoxUnexpectedHttpStatusException


Examples of com.box.boxjavalibv2.exceptions.BoxUnexpectedHttpStatusException

    public Object tryCastObject(final BoxResourceType expectedType, final Object obj) throws BoxServerException, BoxRestException {
        if (obj instanceof BoxServerError) {
            throw new BoxServerException((BoxServerError) obj);
        }
        else if (obj instanceof BoxUnexpectedStatus) {
            throw new BoxUnexpectedHttpStatusException((BoxUnexpectedStatus) obj);
        }
        else {
            Class expectedClass = getResourceHub().getClass(expectedType);
            if (expectedClass.isInstance(obj)) {
                return obj;
View Full Code Here

Examples of com.box.boxjavalibv2.exceptions.BoxUnexpectedHttpStatusException

    public Object tryCastObject(final IBoxType expectedType, final Object obj) throws BoxServerException, BoxRestException {
        if (obj instanceof BoxServerError) {
            throw new BoxServerException((BoxServerError) obj);
        }
        else if (obj instanceof BoxUnexpectedStatus) {
            throw new BoxUnexpectedHttpStatusException((BoxUnexpectedStatus) obj);
        }
        else {
            Class expectedClass = getClassFromType(expectedType);
            if (expectedClass.isInstance(obj)) {
                return obj;
View Full Code Here

Examples of com.box.boxjavalibv2.exceptions.BoxUnexpectedHttpStatusException

        if (response.getResponseStatusCode() != request.getExpectedResponseCode()) {
            ErrorResponseParser errorParser = new ErrorResponseParser(getJSONParser());
            Object o = errorParser.parse(response);
            if (o instanceof BoxServerError) {
                if (o instanceof BoxUnexpectedStatus) {
                    throw new BoxUnexpectedHttpStatusException((BoxUnexpectedStatus) o);
                }
                else {
                    throw new BoxServerException((BoxServerError) o);
                }
            }
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.