Repository navigation
Commit c46e757
feat: expose JobFailedException and JobCancelledException at TSC top level (#1870)
* feat: expose JobFailedException and JobCancelledException at the top level
Both were previously reachable only via
`tableauserverclient.server.endpoint.exceptions`, which is an internal
module path. Callers waiting on a background job with
`server.jobs.wait_for_job()` need to catch these to distinguish a
failed job from a cancelled one (JobCancelledException is a subclass
of JobFailedException, so the order in an except-chain matters), and
reaching into a `server.endpoint` sub-package to do so is a bad
pattern to teach.
Re-export them alongside the other exception types already exposed at
the top level (FailedSignInError, MissingRequiredFieldError,
NotSignedInError, ServerResponseError). Existing internal imports in
tests and endpoints remain unchanged; this is purely additive.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Also expose FlowRunFailedException and FlowRunCancelledException at top level
Same shape and same private-path problem as the Job exceptions this PR is
already fixing. flow_runs.wait_for_flow_run() raises these; users need to
catch them without importing from server.endpoint.exceptions.
Add regression tests for both pairs so a future refactor of __init__.py
can't silently break the public surface.
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Brian Cantoni <bcantoni@salesforce.com>1 parent 81fa0e3 commit c46e757
3 files changed
Lines changed: 36 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
70 | 74 | | |
71 | 75 | | |
72 | 76 | | |
| |||
98 | 102 | | |
99 | 103 | | |
100 | 104 | | |
| 105 | + | |
| 106 | + | |
101 | 107 | | |
102 | 108 | | |
103 | 109 | | |
104 | 110 | | |
105 | 111 | | |
106 | 112 | | |
107 | 113 | | |
| 114 | + | |
| 115 | + | |
108 | 116 | | |
109 | 117 | | |
110 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
16 | 23 | | |
17 | 24 | | |
18 | 25 | | |
| |||
60 | 67 | | |
61 | 68 | | |
62 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
63 | 74 | | |
64 | 75 | | |
65 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
0 commit comments