server-client-python icon indicating copy to clipboard operation
server-client-python copied to clipboard

misleading error message

Open VDFaller opened this issue 2 years ago • 1 comments

Problem

Devs keep running into the same error messages and not being able to debug them.

first

401002: Unauthorized Access Invalid authentication credentials were provided. in our case is because a PAT is being used simultanuously in two places like #717 .

second

Check failed Missing site ID. You must sign in first. This is almost always due to someone nesting functions that have with sign in statements in them like

def outer():
    with server.auth.sign_in(tableau_auth):
       # do stuff
        inner()

def inner():
    with server.auth.sign_in(tableau_auth):
        # do stuff
        print("hi")

it has NEVER been that the site_id was not given in tableau_auth

I know them well enough now to know what's the cause but they're pretty misleading and took us a while to figure out what was actually going on.

VDFaller avatar Apr 22 '23 01:04 VDFaller

Thanks, this is really useful feedback. I'll look at where those errors are being generated on the server and see if those can be more specific.

jacalata avatar May 01 '23 08:05 jacalata