coral-xyz / anchor

⚓ Solana Sealevel Framework
https://anchor-lang.com
Apache License 2.0
3.59k stars 1.32k forks source link

Improve Error Handling #2898

Open brimigs opened 5 months ago

brimigs commented 5 months ago

I was getting the following error: TypeError=: src .toArrayLike is not a function when the issue with my code was just that the front end was passing through the parameters of the anchor instruction in the incorrect order.

The frontend was passing addEmployee(name, salary) while the anchor program was expecting addEmployee(salary, name).

Is there a way to improve this error?

acheroncrypto commented 5 months ago

Is there a way to improve this error?

Yeah, surely! There is a lot of room for improvement with regards to error handling.

Jenifer-TheCoder commented 5 months ago

Hi , I want to start contributing to this project. can you assign to me?