Skip to content

You are trying to throw an error that you never even imported #514

Closed

Description

@dprophet

You are trying to throw an error

NonXMLResponseError

https://github.com/tableau/server-client-python/blob/master/tableauserverclient/server/endpoint/endpoint.py#L73

That you never imported. This totally breaks the debugging for us Corporate users that are behind all kinds of security systems. Please Fix ASAP.

Activity

  1. dprophet commented on Oct 23, 2019

    @dprophet
    Author

    I totally disagree with this NonXMLResponseError error approach. The errors I am experience have to do with low level proxy, firewalls, certificates of authority, and NonXMLResponseError outright masks the error. These errors happen long before any communication has happened with Tableau Server.

    Throw the root error, like you did in v0.8.1 and let the application developer make an intelligent choice. The "ServerResponseError.from_response" is a case of a library trying to do to much.

  2. t8y8 commented on Oct 23, 2019

    @t8y8
    Contributor

    ServerResponseError will throw a ParseError if we revert this and you get a non-success code HTTP response that doesn't include our error-xml object. The ParseError throws an unhelpful 'couldn't parse at line1'.

    Even in 0.8.1, we would just be returning a ParseError.
    What information would you like passed through? The HTTP Response Body?

    We can make a change here to improve it, but I need more detail on how you think the exception handling should flow. Would you be able to share an idea, either here or as a PR that I can review?

    I took a look at the code, and it could be argued that the real issue starts athttps://github.com/tableau/server-client-python/blob/master/tableauserverclient/server/endpoint/exceptions.py#L17 where we blindly assume all response bodies will have an error object

  3. self-assigned this
    on Oct 23, 2019
  4. added a commit that references this issue on Oct 24, 2019
  5. dprophet commented on Oct 25, 2019

    @dprophet
    Author

    First thing is first. Fix the import on

    https://github.com/tableau/server-client-python/blob/master/tableauserverclient/server/endpoint/endpoint.py#L1

    You need to import NonXMLResponseError

  6. t8y8 commented on Oct 25, 2019

    @t8y8
    Contributor

    Agreed, I pushed a fix in #515, it's in development now (where you can pull from to verify) -- we're discussing a patch release to master shortly as well.

  7. bcantoni commented on Feb 22, 2021

    @bcantoni
    Contributor

    I'm going to close this based on the end of the discussion where Tyler added the fix to import that error properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions