@@ -84,7 +84,12 @@ def push_project_async(mc, directory):
8484 mp .log .info ("--- version: " + mc .user_agent_info ())
8585 mp .log .info (f"--- start push { project_path } " )
8686
87- server_info = mc .project_info (project_path )
87+ try :
88+ server_info = mc .project_info (project_path )
89+ except ClientError as err :
90+ mp .log .error ("Error getting project info: " + str (err ))
91+ mp .log .info ("--- push aborted" )
92+ raise
8893 server_version = server_info ["version" ] if server_info ["version" ] else "v0"
8994
9095 mp .log .info (f"got project info: local version { local_version } / server version { server_version } " )
@@ -122,7 +127,12 @@ def push_project_async(mc, directory):
122127 "changes" : changes
123128 }
124129
125- resp = mc .post (f'/v1/project/push/{ project_path } ' , data , {"Content-Type" : "application/json" })
130+ try :
131+ resp = mc .post (f'/v1/project/push/{ project_path } ' , data , {"Content-Type" : "application/json" })
132+ except ClientError as err :
133+ mp .log .error ("Error starting transaction: " + str (err ))
134+ mp .log .info ("--- push aborted" )
135+ raise
126136 server_resp = json .load (resp )
127137
128138 upload_files = data ['changes' ]["added" ] + data ['changes' ]["updated" ]
@@ -181,6 +191,8 @@ def push_project_is_running(job):
181191 """
182192 for future in job .futures :
183193 if future .done () and future .exception () is not None :
194+ job .mp .log .error ("Error while pushing data: " + str (future .exception ()))
195+ job .mp .log .info ("--- push aborted" )
184196 raise future .exception ()
185197 if future .running ():
186198 return True
@@ -205,6 +217,8 @@ def push_project_finalize(job):
205217 # make sure any exceptions from threads are not lost
206218 for future in job .futures :
207219 if future .exception () is not None :
220+ job .mp .log .error ("Error while pushing data: " + str (future .exception ()))
221+ job .mp .log .info ("--- push aborted" )
208222 raise future .exception ()
209223
210224 if job .transferred_size != job .total_size :
@@ -256,6 +270,6 @@ def _do_upload(item, job):
256270 """ runs in worker thread """
257271 if job .is_cancelled :
258272 return
259-
273+
260274 item .upload_blocking (job .mc , job .mp )
261275 job .transferred_size += item .size
0 commit comments