LoadingError

data class LoadingError(val message: String, val isRetryable: Boolean = true)

Error wrapper for loading failures with user-friendly messages.

from classifies a Throwable into one of a small set of user-facing messages by inspecting common network exception types anywhere in the cause chain, then HTTP-status-shaped exception messages (e.g. Ktor's Client request(...) invalid: 404 Not Found). Status codes are matched as whole three-digit tokens, so ids such as order 4040 are not mistaken for a 404. The message-based matching is a pragmatic heuristic that works across HTTP client libraries without adding a hard dependency on any one of them.

Constructors

Link copied to clipboard
constructor(message: String, isRetryable: Boolean = true)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard