Package-level declarations
Types
Properties
Convenience function to extract a user-facing error message from a ClerkResult.Failure.
Functions
Returns the encapsulated Throwable exception if this is a failure.
Returns a new ClerkResult by applying transform to the value of a ClerkResult.Success, or returns the original ClerkResult.Failure if this is a failure.
Returns a ClerkResult.Success holding transform applied to the value of a ClerkResult.Success, keeping its tags, or returns the original ClerkResult.Failure unchanged.
Returns a ClerkResult.Failure whose error is transform applied to the original error, keeping the throwable, status code, error type and tags, or returns the original ClerkResult.Success unchanged. transform is not called when the failure carries no error.
Performs the given action on the encapsulated ClerkResult.Failure if this instance represents failure. Returns the original ClerkApiResult unchanged.
Performs the given action on the encapsulated failure if this instance represents a failure with the specified error type. Returns the original ClerkApiResult unchanged.
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.
If ClerkResult.Success, returns the underlying T value. Otherwise, returns the result of the defaultValue function.
If ClerkResult.Success, returns the underlying T value. Otherwise, calls body with the failure, which can either throw an exception or return early (since this function is inline).
If ClerkResult.Success, returns the underlying T value. Otherwise, returns null.
Returns a new ClerkResult by applying transform to the value of a ClerkResult.Success, or returns the original ClerkResult.Failure if this is a failure.
Transforms an ClerkResult into a C value.