catchAsHttpError
inline fun <R, T : R, E : Throwable> KrosstalkResult<T>.catchAsHttpError(klass: KClass<E>, statusCode: Int, message: (E) -> String? = { it.message }): KrosstalkResult<R>
Content copied to clipboard
Catch an exception by type. Must be called where the exception/KrosstalkResult is created, type information is lost during serialization.