JsonRpcError
Usage
import { request, JsonRpcError } from '@stacks/connect';
try {
const result = await request('stx_transferStx', {
recipient: 'SP2...address',
amount: 1000000n,
});
} catch (error) {
if (error instanceof JsonRpcError) {
console.error(`Error code: ${error.code}`);
console.error(`Message: ${error.message}`);
console.error(`Data: ${error.data}`);
}
}Definition
Properties
message
code
data (optional)
cause (optional)
Static Methods
fromResponse
Instance Methods
toString
Related
Last updated
Was this helpful?