failure

fun <T> failure(exception: Exception): Response.Failure<T>

Creates a failure response with the given exception.

Return

A Failure instance containing the exception.

Parameters

exception

The exception that caused the failure.