AptosApiError

@Serializable
data class AptosApiError(val message: String, val errorCode: String, val vmErrorCode: Long? = null) : Exception

Represents a structured error response from the Aptos REST API.

Constructors

Link copied to clipboard
constructor(message: String, errorCode: String, vmErrorCode: Long? = null)

Properties

Link copied to clipboard

A helper property to conveniently access the typed AptosErrorCode.

Link copied to clipboard
@SerialName(value = "error_code")
val errorCode: String

A specific error code for more granular error information.

Link copied to clipboard
open override val message: String

A descriptive message about the error.

Link copied to clipboard
@SerialName(value = "vm_error_code")
val vmErrorCode: Long?

Provides VM error details when submitting transactions.