Package com.heroku.api.exception

Examples of com.heroku.api.exception.RequestFailedException


        if (Http.Status.OK.equals(code) || Http.Status.FORBIDDEN.equals(code)) {
            return true;
        } else if (Http.Status.NOT_FOUND.equals(code)) {
            return false;
        } else {
            throw new RequestFailedException("Unexpected app exist status", code, data);
        }
    }
View Full Code Here


    @Override
    public Unit getResponse(byte[] in, int code) {
        if (code == Http.Status.OK.statusCode)
            return Unit.unit;
        else
            throw new RequestFailedException("AppDestroy failed", code, in);
    }
View Full Code Here

    @Override
    public List<Addon> getResponse(byte[] bytes, int status) {
        if (status == Http.Status.OK.statusCode) {
            return parse(bytes, getClass());
        }
        throw new RequestFailedException(
                "Unable to get addons for " + config.get(Heroku.RequestKey.AppName), status, bytes);
    }
View Full Code Here

    public Unit getResponse(byte[] in, int code) {
        if (code == Http.Status.OK.statusCode)
            return Unit.unit;
        else
            throw new RequestFailedException("KeysAdd failed", code, in);
    }
View Full Code Here

    }

    @Override
    public App getResponse(byte[] in, int status) {
        if (status != Http.Status.OK.statusCode) {
            throw new RequestFailedException("Failed to clone app", status, in);
        }

        return parse(in, getClass());
    }
View Full Code Here

            if (new String(bytes).contains("nil-classes")) {
                return new ArrayList<Key>();
            }
            return parse(bytes, getClass());
        } else {
            throw new RequestFailedException("Unable to list keys.", status, bytes);
        }
    }
View Full Code Here

    @Override
    public AddonChange getResponse(byte[] bytes, int status) {
        if (status == Http.Status.OK.statusCode) {
            return Json.parse(bytes, this.getClass());
        } else {
            throw new RequestFailedException("Unable to add addon " + config.get(Heroku.RequestKey.AddonName), status, bytes);
        }
    }
View Full Code Here

    @Override
    public Unit getResponse(byte[] in, int code) {
        if (code == Http.Status.OK.statusCode)
            return Unit.unit;
        else
            throw new RequestFailedException("KeysRemove failed", code, in);
    }
View Full Code Here

    @Override
    public List<App> getResponse(byte[] in, int code) {
        if (code == 200)
            return Json.parse(in, AppList.class);
        else
            throw new RequestFailedException("AppList Failed", code, in);
    }
View Full Code Here

    @Override
    public AddonChange getResponse(byte[] bytes, int status) {
        if (status == Http.Status.OK.statusCode) {
            return parse(bytes, getClass());
        }
        throw new RequestFailedException("Unable to remove addon.", status, bytes);
    }
View Full Code Here

TOP

Related Classes of com.heroku.api.exception.RequestFailedException

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.