File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 2626use Sgdg \Vendor \Google \Service \Drive \FileList ;
2727use Sgdg \Vendor \Google \Service \Exception as Google_Service_Exception ;
2828use Sgdg \Vendor \Google \Task \Runner ;
29+ use Sgdg \Vendor \GuzzleHttp \Exception \TransferException ;
2930use Sgdg \Vendor \GuzzleHttp \Promise \Promise ;
3031use Sgdg \Vendor \GuzzleHttp \Promise \PromiseInterface ;
3132use Sgdg \Vendor \GuzzleHttp \Promise \Utils ;
@@ -321,7 +322,12 @@ private static function execute_current_batch() {
321322 ),
322323 'Batch Drive call ' ,
323324 static function () use ( $ batch ) {
324- $ ret = $ batch ->execute ();
325+ try {
326+ $ ret = $ batch ->execute ();
327+ } catch ( TransferException $ e ) {
328+ // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped
329+ throw new Google_Service_Exception ( $ e ->getMessage () );
330+ }
325331
326332 foreach ( $ ret as $ response ) {
327333 $ exception = self ::wrap_response_exception ( $ response );
You can’t perform that action at this time.
0 commit comments