Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TableauHTTP#get_trusted_ticket_for_user should raise an exception if it fails #99

Open
miau opened this issue Aug 27, 2020 · 0 comments

Comments

@miau
Copy link

miau commented Aug 27, 2020

TableauHTTP#get_trusted_ticket_for_user doesn't raise an exception when the response.content == b'-1'.

https://github.com/bryantbhowell/tableau_tools/blob/f04234ef93109543025f990f6e79f8da6f567b05/tableau_http.py#L22

should be:

        ticket = response.content
        if ticket == b'-1' or not ticket:
            raise NoResultsException('Ticket generation was not complete (returned "-1"), check Tableau Server trusted authorization configurations')
        else:
            return ticket

or (when you expect this method to return str):

        ticket = response.content.decode()
        if ticket == '-1' or not ticket:
            raise NoResultsException('Ticket generation was not complete (returned "-1"), check Tableau Server trusted authorization configurations')
        else:
            return ticket
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant