Target filter
Search Kotlin docs
  • Back
  • Tealium Prism Kotlin SDK Reference
core/com.tealium.prism.core.api.network/NetworkException/Non200Exception

Non200Exception

class Non200Exception @JvmOverloads constructor(val statusCode: Int, val httpResponse: HttpResponse? = null) : NetworkException

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

Parameters

statusCode

The HTTP status code of the network response

httpResponse

The response that was received, whose HttpResponse.body carries any error body returned by the server, if it could be read

Constructors

Non200Exception
Link copied to clipboard
@JvmOverloads
constructor(statusCode: Int, httpResponse: HttpResponse? = null)

Properties

cause
Link copied to clipboard
open val cause: Throwable?
httpResponse
Link copied to clipboard
val httpResponse: HttpResponse? = null
message
Link copied to clipboard
open val message: String?
statusCode
Link copied to clipboard
val statusCode: Int

Functions

isRetryable
Link copied to clipboard
open override fun isRetryable(): Boolean

Returns true only for status codes that indicate a transient failure: 408 (Request Timeout), 429 (Too Many Requests), 500 (Internal Server Error), 502 (Bad Gateway), 503 (Service Unavailable) and 504 (Gateway Timeout). Every other status code is deemed not safe to retry.

toString
Link copied to clipboard
open override fun toString(): String
Generated by Dokka
(c) Tealium 2026