Skip to content

Commit 0cf7d58

Browse files
committed
Fix crash on authentication error
1 parent b371e8d commit 0cf7d58

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

chipflow_lib/steps/silicon.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -196,15 +196,12 @@ def network_err(e):
196196
},
197197
allow_redirects=False
198198
)
199-
except requests.ConnectTimeout as e:
200-
network_err(e)
201-
except requests.ConnectionError as e:
202-
if type(e.__context__) is urllib3.exceptions.MaxRetryError:
203-
network_err(e)
204199
except Exception as e:
205-
network_err(e)
200+
logger.error(f"Unexpected error submitting design: {e}")
201+
sp.fail(f"Unexpected error: {e}")
202+
203+
assert resp is not None
206204

207-
assert resp
208205
# Parse response body
209206
try:
210207
resp_data = resp.json()
@@ -265,6 +262,7 @@ def _long_poll_stream(self, sp, network_err):
265262
timeout=(2.0, 60.0) # fail if connect takes >2s, long poll for 60s at a time
266263
)
267264
if log_resp.status_code == 200:
265+
logger.debug(f"response from {self._log_stream_url}:\n{log_resp}")
268266
for line in log_resp.iter_lines():
269267
line_str = line.decode("utf-8") if line else ""
270268
logger.debug(line_str)

0 commit comments

Comments
 (0)