def wrapper(*args, **kwargs):
    try:
        return func(*args, **kwargs)
    except HTTPError as err:
        if (err.response.status_code == 404):
            logger.error("Workflow doesn't seem to exist.")
            return
        message = '{err}\n\nCromwell server is on but got an HTTP error other than 404. '.format(err=err)
        raise HTTPError(message) from None
    except ConnectionError as err:
        message = '{err}\n\nFailed to connect to Cromwell server. Check if Caper server is running. Also check if hostname and port are correct. method={method}, url={url}'.format(err=err, method=err.request.method, url=err.request.url)
        raise ConnectionError(message) from None
def wrapper(*args, **kwargs):
    try:
        return func(*args, **kwargs)
    except HTTPError as err:
        if (err.response.status_code == 404):
            logger.error("Workflow doesn't seem to exist.")
            return
        message = '{err}\n\nCromwell server is on but got an HTTP error other than 404. '.format(err=err)
        raise HTTPError(message) from None
    except ConnectionError as err:
        message = '{err}\n\nFailed to connect to Cromwell server. Check if Caper server is running. Also check if hostname and port are correct. method={method}, url={url}'.format(err=err, method=err.request.method, url=err.request.url)
        raise ConnectionError(message) from None