feat(exceptions): separate failed signin error - #1478
Merged
Conversation
jorwoods
force-pushed
the
jorwoods/signin_error
branch
2 times, most recently
from
September 28, 2024 17:07
878e813 to
74f7797
Compare
Contributor
Contributor
Author
|
@bcantoni I made a tweak to how the ServerInfoItem does its error handling to raise the error immediately. It currently raises a |
Contributor
Author
|
I also changed the log level on those messages from info to exception so that they'll bubble up more clearly in logs. |
Closes tableau#1472 This makes sign in failures their own class of exceptions, while still inheriting from NotSignedInException to not break backwards compatability for any existing client code. This should allow users to get out more specific exceptions more easily on what failed with their authentication request.
If ServerInfoItem.from_response gets invalid XML, raise the error immediately instead of suppressing the error and setting an invalid version number
jorwoods
force-pushed
the
jorwoods/signin_error
branch
from
September 28, 2024 18:57
388d1bd to
6eab3c9
Compare
Contributor
|
Did some quick testing and this change looks good. Sign in with incorrect PAT, before: Sign in with incorrect PAT, after: |
Contributor
Author
|
Do you want it to raise the NonXMLResponseError? Or should I revert that change? |
jacalata
added a commit
that referenced
this pull request
Oct 24, 2024
* Feature: export custom views #999 (#1506) * feat(exceptions): separate failed signin error (#1478) * refactor request_options, add language param (#1481) * Set FILESIZE_LIMIT_MB via environment variables (#1466) * added PulseMetricDefine cap (#1490) * Adding project permissions handling for databases, tables and virtual connections (#1482) * fix: queryset support for flowruns (#1460) * fix: set unknown size to sys.maxsize * fix: handle 0 item response in querysets (#1501) * chore: support VizqlDataApiAccess capability (#1504) * refactor(test): extract error factory to _utils * chore(typing): flowruns.cancel can also accept a FlowRunItem * chore: type hint default permissions endpoints (#1493) * chore(versions): update remaining f-strings (#1477) * Make urllib3 dependency more flexible (#1468) * Update requests library for CVE CVE-2024-35195 (#1507) * chore(versions): Upgrade minimum python version (#1465) * ci: cache dependencies for faster builds (#1497) * ci: build on python 3.13 (#1492) * Update samples for Python 3.x compatibility (#1479) * chore: remove py2 holdover code (#1496) * #Add 'description' to datasource sample code (#1475) * Remove sample code showing group name encoding (#1486) * chore(typing): include samples in type checks (#1455) * fix: docstring on QuerySet * docs: add docstrings to auth objects and endpoints (#1484) * docs: docstrings for Server and ServerInfo (#1494) * docs: docstrings for user item and endpoint (#1485) * docs: docstrings for site item and endpoint (#1495) * docs: workbook docstrings (#1488) * #1464 - docs update for filtering on boolean values (#1471) --------- Co-authored-by: Brian Cantoni <[email protected]> Co-authored-by: Jordan Woods <[email protected]> Co-authored-by: Jordan Woods <[email protected]> Co-authored-by: Jac <[email protected]> Co-authored-by: Henning Merklinger <[email protected]> Co-authored-by: AlbertWangXu <[email protected]> Co-authored-by: TrimPeachu <[email protected]>
vchavatapalli
pushed a commit
to vchavatapalli/server-client-python
that referenced
this pull request
May 5, 2026
* Feature: export custom views tableau#999 (tableau#1506) * feat(exceptions): separate failed signin error (tableau#1478) * refactor request_options, add language param (tableau#1481) * Set FILESIZE_LIMIT_MB via environment variables (tableau#1466) * added PulseMetricDefine cap (tableau#1490) * Adding project permissions handling for databases, tables and virtual connections (tableau#1482) * fix: queryset support for flowruns (tableau#1460) * fix: set unknown size to sys.maxsize * fix: handle 0 item response in querysets (tableau#1501) * chore: support VizqlDataApiAccess capability (tableau#1504) * refactor(test): extract error factory to _utils * chore(typing): flowruns.cancel can also accept a FlowRunItem * chore: type hint default permissions endpoints (tableau#1493) * chore(versions): update remaining f-strings (tableau#1477) * Make urllib3 dependency more flexible (tableau#1468) * Update requests library for CVE CVE-2024-35195 (tableau#1507) * chore(versions): Upgrade minimum python version (tableau#1465) * ci: cache dependencies for faster builds (tableau#1497) * ci: build on python 3.13 (tableau#1492) * Update samples for Python 3.x compatibility (tableau#1479) * chore: remove py2 holdover code (tableau#1496) * #Add 'description' to datasource sample code (tableau#1475) * Remove sample code showing group name encoding (tableau#1486) * chore(typing): include samples in type checks (tableau#1455) * fix: docstring on QuerySet * docs: add docstrings to auth objects and endpoints (tableau#1484) * docs: docstrings for Server and ServerInfo (tableau#1494) * docs: docstrings for user item and endpoint (tableau#1485) * docs: docstrings for site item and endpoint (tableau#1495) * docs: workbook docstrings (tableau#1488) * tableau#1464 - docs update for filtering on boolean values (tableau#1471) --------- Co-authored-by: Brian Cantoni <[email protected]> Co-authored-by: Jordan Woods <[email protected]> Co-authored-by: Jordan Woods <[email protected]> Co-authored-by: Jac <[email protected]> Co-authored-by: Henning Merklinger <[email protected]> Co-authored-by: AlbertWangXu <[email protected]> Co-authored-by: TrimPeachu <[email protected]>
vchavatapalli
pushed a commit
to vchavatapalli/server-client-python
that referenced
this pull request
May 5, 2026
* feat(exceptions): separate failed signin error Closes tableau#1472 This makes sign in failures their own class of exceptions, while still inheriting from NotSignedInException to not break backwards compatability for any existing client code. This should allow users to get out more specific exceptions more easily on what failed with their authentication request. * fix(error): raise exception when ServerInfo.get fails If ServerInfoItem.from_response gets invalid XML, raise the error immediately instead of suppressing the error and setting an invalid version number * fix(test): add missing test asset --------- Co-authored-by: Jordan Woods <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1472
This makes sign in failures their own class of exceptions, while still inheriting from NotSignedInException to not break backwards compatability for any existing client code. This should allow users to get out more specific exceptions more easily on what failed with their authentication request.