File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -280,6 +280,7 @@ def upload_qc_metrics(
280
280
start_message = messages .QC_UPLOAD_START .format (url = endpoint )
281
281
config .loggers .interface .info (start_message )
282
282
283
+ errmsg = None
283
284
try :
284
285
# if the modality is bold, call "bold" endpoint
285
286
response = requests .post (
@@ -289,8 +290,12 @@ def upload_qc_metrics(
289
290
timeout = 15 ,
290
291
)
291
292
except requests .ConnectionError as err :
292
- errmsg = f'QC metrics failed to upload due to connection error shown below:\n { err } '
293
- return Bunch (status_code = 1 , text = errmsg ), data
293
+ errmsg = (f'Error uploading IQMs: Connection error:' , f'{ err } ' )
294
+ except requests .exceptions .ReadTimeout as err :
295
+ errmsg = (f'Error uploading IQMs: Server { endpoint } is down.' , f'{ err } ' )
296
+
297
+ if errmsg is not None :
298
+ response = Bunch (status_code = 1 , text = '\n ' .join (errmsg ))
294
299
295
300
return response , data
296
301
You can’t perform that action at this time.
0 commit comments