File tree 1 file changed +8
-2
lines changed
android/src/main/java/com/RNFetchBlob
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -592,13 +592,19 @@ private void done(Response resp) {
592
592
}
593
593
594
594
RNFetchBlobFileResp rnFetchBlobFileResp ;
595
-
595
+
596
596
try {
597
597
rnFetchBlobFileResp = (RNFetchBlobFileResp ) responseBody ;
598
598
} catch (ClassCastException ex ) {
599
599
// unexpected response type
600
600
if (responseBody != null ) {
601
- callback .invoke ("Unexpected FileStorage response file: " + responseBody .string (), null );
601
+ String responseBodyString = null ;
602
+ try {
603
+ responseBodyString = responseBody .string ();
604
+ } catch (IOException exception ) {
605
+ exception .printStackTrace ();
606
+ }
607
+ callback .invoke ("Unexpected FileStorage response file: " + responseBodyString , null );
602
608
} else {
603
609
callback .invoke ("Unexpected FileStorage response with no file." , null );
604
610
}
You can’t perform that action at this time.
0 commit comments