def get_notion_client(token):
    try:
        return NotionClient(token_v2=token)
    except HTTPError as e:
        if (e.response.status_code == codes['unauthorized']):
            raise BadTokenException
        raise
def get_notion_client(token):
    try:
        return NotionClient(token_v2=token)
    except HTTPError as e:
        if (e.response.status_code == codes['unauthorized']):
            raise BadTokenException
        raise