Package-level declarations

Types

Link copied to clipboard

The base class for all exceptions

Link copied to clipboard
Link copied to clipboard
class ApolloHttpException(val statusCode: Int, val headers: List<HttpHeader>, val body: BufferedSource?, message: String, cause: Throwable? = null) : ApolloException

The response was received but the media type was application/json and the code was not 2xx. Note that application/graphql-response+json do not throw this exception.

Link copied to clipboard
class ApolloNetworkException(message: String? = null, val platformCause: Any? = null) : ApolloException

An I/O error happened: socket closed, DNS issue, TLS problem, file not found, etc...

Link copied to clipboard
class ApolloParseException(message: String? = null, cause: Throwable? = null) : ApolloException

The response could not be parsed because of an I/O exception.

Link copied to clipboard
class ApolloWebSocketClosedException(val code: Int, val reason: String? = null, cause: Throwable? = null) : ApolloException

A WebSocket close frame was received from the server

Link copied to clipboard

closeConnection() was called to force closing the websocket

Link copied to clipboard
class CacheMissException constructor(val key: String, val fieldName: String? = null, stale: Boolean = false) : ApolloException

An object/field was missing in the cache If fieldName is null, it means a reference to an object could not be resolved

Link copied to clipboard
class DefaultApolloException(message: String? = null, cause: Throwable? = null) : ApolloException

A generic exception used when there is no additional context besides the message.

Link copied to clipboard
class HttpCacheMissException(message: String, cause: Exception? = null) : ApolloException

An HTTP cache miss happened

Link copied to clipboard

Thrown when the data in a JSON document doesn't match the data expected by the caller.

Link copied to clipboard

Thrown when the data being parsed is not encoded as valid JSON.

Link copied to clipboard

No data was found

Link copied to clipboard

A field was missing or null in the JSON response.

Link copied to clipboard
data object OfflineException : IOException

The device has been detected as offline

Link copied to clipboard
class RouterError(val errors: List<Error>) : ApolloException

The router sent one or several errors.

Link copied to clipboard

The server responded with an error to the 'connection_init' message.

Link copied to clipboard
class SubscriptionOperationException(operationName: String, val payload: Any?) : ApolloException

The server could not process a subscription and sent an error.

Properties

Link copied to clipboard

A handler that can be set to intercept certain exceptions occurring in the library that are not normally surfaced. This can be used to investigate issues. The default is to log the exception.

Link copied to clipboard