Questions tagged [error-handling]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
108 views

Transaction simulation failed: Account with insufficient funds for rent

I'm encountering an issue while trying to execute a transaction on the Solana Devnet. The error message I'm receiving is: Transaction simulation failed: Transaction results in an account (1) with ...
guneyuzel's user avatar
3 votes
1 answer
137 views

What is the best way to do "safe math" in rust or anchor programs?

I know with rust you need to be sure you do not cause buffer overflows/underflows when performing math operations. What are the best practices for doing common math safely within programs? Adding, ...
nickfrosty's user avatar
  • 1,016
0 votes
1 answer
91 views

Token deploy on mainnet, create metadata custom program error: 0x4b

We are trying to deploy our token (AIDS) on mainnet: https://explorer.solana.com/address/ExCgGC6CEegjjif7yqxpcreEaarb83K8YaXzmf3PRWAZ . When we are trying to create metadata for this token, we call ...
Andrei Tintari's user avatar
1 vote
0 answers
104 views

How to handle solana pay transaction request error when server is separate from client? [closed]

I am maintaining a server for transaction request . when I am scanning the qr on my client (browser) and wallet(Phantom) is making a request to the server which is running separately the code is ...
subhajit das's user avatar
4 votes
1 answer
193 views

Mismatched types on custom error

I'm getting this error on build when trying to apply custom errors: error[E0308]: mismatched types --> programs/auc/src/lib.rs:27:20 | 27 | return err!(MyError::NotAdmin); | ...
Matti's user avatar
  • 129
1 vote
1 answer
116 views

How to handle error of invoked_signed calls?

This is my sample code, I am trying to handle the error thrown from cross-invocation calls. let result = invoke_signed( &instruction, &[re_account.clone()], &[&[b&...
crypto sahdev's user avatar
4 votes
1 answer
207 views

solana/web3.js Handle Network Errors

So im getting erros when calling the function getParsedTransaction() for example form the RPC-Node which is an 502 (Gateway-Error) How would one implement a way to catch the error in JS/TS since the ...
DZWG's user avatar
  • 81
1 vote
1 answer
476 views

Anchor: How can I check specific Anchor Error Codes are caught in my test script if they are expected? [closed]

I have the following setName function and Name error code setup in my script as: pub fn set_name( ctx: Context<Name>, name: String, ) -> Result<()> { if ...
Omega's user avatar
  • 55