SorobanRpcError
public struct SorobanRpcError : Error, Sendable
Represents an error response from the Soroban RPC server following JSON-RPC 2.0 specification.
-
The error code. Standard JSON-RPC codes include: -32700 (Parse error), -32600 (Invalid Request), -32601 (Method not found), -32602 (Invalid params), -32603 (Internal error)
Declaration
Swift
public let code: Int -
A short description of the error.
Declaration
Swift
public let message: String? -
Additional information about the error (optional).
Declaration
Swift
public let data: String? -
Creates a new SorobanRpcError.
Declaration
Swift
public init(code: Int, message: String? = nil, data: String? = nil)Parameters
codeThe error code.
messageA short description of the error.
dataAdditional information about the error.
View on GitHub
Install in Dash