Api

sealed class Api : PortalException

Base exception class for API and network-related errors.

This class serves as the parent for all recoverable errors related to API and network operations.

Inheritors

Types

Link copied to clipboard
class HttpRequestFailed(message: String, cause: Throwable? = null) : PortalException.Api

Thrown when an HTTP request fails with a non-success status code.

Link copied to clipboard
open class HttpUnauthorized(message: String, cause: Throwable? = null) : PortalException.Api

Thrown when an HTTP request is unauthorized (401).

Link copied to clipboard
open class RpcError(val code: Int, val message: String, cause: Throwable? = null) : PortalException.Api

Thrown when an RPC request fails.

Link copied to clipboard
class YieldApiBadRequest(message: String, cause: Throwable? = null) : PortalException.Api

Thrown when the Yield API returns a 400 Bad Request error.

Properties

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