ignore

inline fun <T> RestResult<T>.ignore(predicate: (Throwable) -> Boolean): RestResult<T>(source)

Dismisses the encapsulated exception if it corresponds to an predicate.

Allows for orThrow to be used on failures without throwing, but does not allow using functions returning values.

Returns a new RestResult if the exception matches.

See also


fun <T> RestResult<T>.ignore(vararg responses: ErrorResponse): RestResult<T>(source)

Dismisses the encapsulated error response if it corresponds to an ignored response.

Allows for orThrow to be used on failures without throwing, but does not allow using functions returning values.

Returns a new RestResult if the exception matches.

See also


fun <T> RestResult<T>.ignore(vararg types: KClass<out Throwable>): RestResult<T>(source)

Dismisses the encapsulated exception if it corresponds to an ignored exception.

Allows for orThrow to be used on failures without throwing, but does not allow using functions returning values.

Returns a new RestResult if the exception matches.

See also