|
@@ -592,13 +592,19 @@ public class RNFetchBlobReq extends BroadcastReceiver implements Runnable {
|
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.body().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
|
}
|