Can we convert this in to ServerResponseError.from_response exception instead of NonXMLResponseError
It would be helpful if ServerResponseError.from_response is implemented on line 173 instead NonXMLResponseError.
https://github.com/tableau/server-client-python/blob/4259316ef2e2656531b0c65c71d043708b37b4a9/tableauserverclient/server/endpoint/endpoint.py#L173
Can you expand on what you're trying to do and why you think that would be helpful? ServerResponseError is for interpreting errors from a Tableau Server, and parsing that XML into a more descriptive error. If you're getting a NonXMLResponseError then a ServerResponseError.from_response would also not be able to process the content returned. If you're just trying to catch the error, you probably want to go one level up in the exception hierarchy.
from tableauserverclient.server.endpoint.exceptions import TableauError
It's improves the readability and parsing of information, as ServerResponseError.
The issue is if the server doesn't return XML, it can't be parsed into a ServerResponseError. Hence: NonXMLResponseError.
but I have seen it responding xml response but data is not parsed.
Can you post a reproducible example of what you are trying when you get the error, as well as the error message returned?
This is happening when personal token is wrong and Server authentication failed to Sign in.
As you can see in this, it's a XML response the exception is raised because of wrong token.