rethrow

inline fun <T : Exception, R> ApiResult<R>.rethrow(): ApiResult<R>

Throws if this result is an Error and Error.e is of type T. Ignores all other exceptions.

Return

a result that can be Error but is guaranteed to not have an exception of type T wrapped.