diff --git a/rx_paparazzo/src/main/java/com/miguelbcr/ui/rx_paparazzo/interactors/PickImage.java b/rx_paparazzo/src/main/java/com/miguelbcr/ui/rx_paparazzo/interactors/PickImage.java index 9e4a11d..6ea7b4f 100644 --- a/rx_paparazzo/src/main/java/com/miguelbcr/ui/rx_paparazzo/interactors/PickImage.java +++ b/rx_paparazzo/src/main/java/com/miguelbcr/ui/rx_paparazzo/interactors/PickImage.java @@ -22,6 +22,8 @@ import android.support.annotation.Nullable; import java.io.File; import rx.Observable; +import rx.exceptions.Exceptions; +import rx.functions.Action1; import rx.functions.Func1; import rx.schedulers.Schedulers; import rx_activity_result.OnPreResult; @@ -66,6 +68,11 @@ public Observable response(int responseCode, @Nullable final Intent inte intent.setData(Uri.fromFile(new File(filePath))); return filePath; } + }) + .onErrorResumeNext(new Func1>() { + @Override public Observable call(Throwable throwable) { + return Observable.just(""); + } }); } else { return Observable.just("");