Package io.getstream.result.call
Class ReturnOnErrorCall
-
- All Implemented Interfaces:
-
io.getstream.result.call.Call
public final class ReturnOnErrorCall<T extends Object> implements Call<T>
A wrapper around Call that swallows the error and emits new data from onErrorReturn.
-
-
Constructor Summary
Constructors Constructor Description ReturnOnErrorCall(Call<T> originalCall, CoroutineScope scope, SuspendFunction1<Error, Result<T>> onErrorReturn)
-
Method Summary
Modifier and Type Method Description Result<T>execute()Executes the call synchronously, in a blocking way. Unitenqueue(Call.Callback<T> callback)Executes the call asynchronously, on a background thread. Unitcancel()Cancels the execution of the call. Result<T>await()Awaits the result of this Call in a suspending way, asynchronously. -
-
Constructor Detail
-
ReturnOnErrorCall
ReturnOnErrorCall(Call<T> originalCall, CoroutineScope scope, SuspendFunction1<Error, Result<T>> onErrorReturn)
-
-
-
-