@@ -678,7 +678,7 @@ private void done(Response resp) {
678678 try (FileOutputStream fos = new FileOutputStream (file )) {
679679 fos .write (ReactNativeBlobUtilFileTransformer .sharedFileTransformer .onWriteFile (b ));
680680 } catch (Exception e ) {
681- invoke_callback ("Error from file transformer:" + e .getLocalizedMessage (), null );
681+ invoke_callback ("Error from file transformer:" + e .getLocalizedMessage (), respmap . copy () );
682682 return ;
683683 }
684684 invoke_callback (null , ReactNativeBlobUtilConst .RNFB_RESPONSE_PATH , this .destPath , respmap .copy ());
@@ -709,7 +709,7 @@ private void done(Response resp) {
709709 }
710710 }
711711 } catch (IOException e ) {
712- invoke_callback ("ReactNativeBlobUtil failed to encode response data to BASE64 string." , null );
712+ invoke_callback ("ReactNativeBlobUtil failed to encode response data to BASE64 string." , respmap . copy () );
713713 }
714714 break ;
715715 case FileStorage :
@@ -741,15 +741,15 @@ private void done(Response resp) {
741741 } catch (IOException exception ) {
742742 exception .printStackTrace ();
743743 }
744- invoke_callback ("Unexpected FileStorage response file: " + responseBodyString , null );
744+ invoke_callback ("Unexpected FileStorage response file: " + responseBodyString , respmap . copy () );
745745 } else {
746- invoke_callback ("Unexpected FileStorage response with no file." , null );
746+ invoke_callback ("Unexpected FileStorage response with no file." , respmap . copy () );
747747 }
748748 return ;
749749 }
750750
751751 if (ReactNativeBlobUtilFileResp != null && !ReactNativeBlobUtilFileResp .isDownloadComplete ()) {
752- invoke_callback ("Download interrupted." , null , respmap .copy ());
752+ invoke_callback ("Download interrupted." , respmap .copy ());
753753 } else {
754754 this .destPath = this .destPath .replace ("?append=true" , "" );
755755 invoke_callback (null , ReactNativeBlobUtilConst .RNFB_RESPONSE_PATH , this .destPath , respmap .copy ());
@@ -760,7 +760,7 @@ private void done(Response resp) {
760760 try {
761761 invoke_callback (null , ReactNativeBlobUtilConst .RNFB_RESPONSE_UTF8 , new String (resp .body ().bytes (), "UTF-8" ), respmap .copy ());
762762 } catch (IOException e ) {
763- invoke_callback ("ReactNativeBlobUtil failed to encode response data to UTF8 string." , null );
763+ invoke_callback ("ReactNativeBlobUtil failed to encode response data to UTF8 string." , respmap . copy () );
764764 }
765765 break ;
766766 }
0 commit comments