Failure
class Failure<out E : Any>(val error: E?, val throwable: Throwable? = null, val code: Int? = null, val errorType: ClerkResult.Failure.ErrorType = ErrorType.UNKNOWN, tags: Map<KClass<*>, Any> = emptyMap()) : ClerkResult<Nothing, E>
A unified failure type that contains all necessary error information.
Constructors
Properties
Link copied to clipboard
Link copied to clipboard
Convenience function to extract the long error message from a ClerkResult.Failure.
Functions
Link copied to clipboard
Returns the encapsulated Throwable exception if this is a failure.
Link copied to clipboard
Convenience function to extract the first error message from a ClerkResult.Failure containing a ClerkErrorResponse. Returns null
if the error is not a ClerkErrorResponse or if there are no error messages.