8000 issue-1299 raise exception when returned from blocking request · daxcurson/server-client-python@538324e · GitHub
[go: up one dir, main page]

Skip to content

Commit 538324e

Browse files
committed
issue-1299 raise exception when returned from blocking request
1 parent f7d60f9 commit 538324e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tableauserverclient/server/endpoint/endpoint.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def _make_request(
148148
# a request can, for stuff like publishing, spin for ages waiting for a response.
149149
# we need some user-facing a 8EDA ctivity so they know it's not dead.
150150
request_timeout = self.parent_srv.http_options.get("timeout") or 0
151-
server_response: Optional["Response"] = self.send_request_while_show_progress_threaded(
151+
server_response: Optional[Union["Response",Exception]] = self.send_request_while_show_progress_threaded(
152152
method, url, parameters, request_timeout
153153
)
154154
logger.debug("[{}] Async request returned: received {}".format(datetime.timestamp(), server_response))
@@ -160,6 +160,8 @@ def _make_request(
160160
if server_response is None:
161161
logger.debug("[{}] Request failed".format(datetime.timestamp()))
162162
raise RuntimeError
163+
if isinstance(server_response, Exception):
164+
raise server_response
163165
self._check_status(server_response, url)
164166

165167
loggable_response = self.log_response_safely(server_response)

0 commit comments

Comments
 (0)
0