NetworkingError

sealed class NetworkingError : Exception

Errors that the Frame SDK network layer can surface to callers.

Use isTransport to distinguish retryable connectivity failures from server-validation errors that require the user to correct their input.

Inheritors

Types

Link copied to clipboard

The server responded successfully, but the response body could not be decoded.

Link copied to clipboard

The constructed URL was malformed and the request could not be sent.

Link copied to clipboard
data class ServerError(val statusCode: Int, val errorDescription: String) : NetworkingError

The server returned a non-2xx status code.

Link copied to clipboard

An unexpected error occurred that does not fit a more specific category.

Properties

Link copied to clipboard
open val cause: Throwable?
Link copied to clipboard

True for connectivity-class failures the user can retry. False for server-validation errors that should stay in the form so the user can correct the input.

Link copied to clipboard
open val message: String?

Functions

Link copied to clipboard
fun toastMessage(fallback: String = "Something went wrong. Please try again."): String

User-facing message for the snackbar surface, prefixed with "Error: " for clarity. For ServerError, parses the standard Frame envelope ({"error_details":{"message":"…"},"error":"…"}) and prefers error_details.message. For transport-class errors or unparseable bodies, returns fallback prefixed the same way.