Target filter
Search Kotlin docs
  • Platforms
  • Tealium Prism Kotlin
core/com.tealium.prism.core.api.network/NetworkException

NetworkException

sealed class NetworkException : TealiumIOException

Return type to signify that an error has occurred. The type returned indicates what type of error has occurred, and the isRetryable implementation will indicate if it is safe to retry the request.

See also

NetworkException.Non200Exception
NetworkException.NetworkIOException
NetworkException.UnexpectedException
NetworkException.CancelledException

Inheritors

Non200Exception
NetworkIOException
UnexpectedException
CancelledException

Types

CancelledException
Link copied to clipboard
object CancelledException : NetworkException

Indicates that the request was cancelled by the requester. It is therefore unknown whether it is safe to retry the request, so it is deemed not safe to retry.

NetworkIOException
Link copied to clipboard
class NetworkIOException(cause: IOException?) : NetworkException

Indicates that a connection was not able to be made - possibly due to loss of connectivity prior to the connection being opened. This type of error can always be retried as no connection to the destination was ever made.

Non200Exception
Link copied to clipboard
class Non200Exception(val statusCode: Int) : NetworkException

Indicates that the response was a non-2XX HTTP status code. Whether the request can be retried is determined by the statusCode.

UnexpectedException
Link copied to clipboard
class UnexpectedException(cause: Throwable?) : NetworkException

Indicates that a network request failed for an unknown reason. It is therefore unknown whether it is safe to retry the request, so it is deemed not safe to retry.

Properties

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

Functions

isRetryable
Link copied to clipboard
abstract fun isRetryable(): Boolean
Generated by Dokka
(c) Tealium 2026