@wraps(func)
def wrapped(*args, **kwargs):
    try:
        return func(*args, **kwargs)
    except ClientHttpError as e:
        if (e.code == 404):
            raise DoesNotExist(msg)
        else:
            raise
@wraps(func)
def wrapped(*args, **kwargs):
    try:
        return func(*args, **kwargs)
    except ClientHttpError as e:
        if (e.code == 404):
            raise DoesNotExist(msg)
        else:
            raise