Menu

Post image 1
Post image 2
1 / 2
0

Your try/catch Won't Save You on Solana (and That Cost Me Lamports to Learn)

DEV Community·Tanisha fonseca·17 days ago
#jSkGaBYl
Reading 0:00
15s threshold

In Web2, failed requests are free. You misconfigure a Stripe call, Stripe says 400 Bad Request , you fix it, you try again. No charge. The server rejected your request before doing any real work, or if it did do work, the rollback is Stripe's problem, not yours. I assumed Solana worked the same way. It doesn't. And I found out the expensive way , well, "expensive" in a devnet sense, but the lesson transferred. The day I broke things on purpose On Day 19 of #100DaysOfSolana, the challenge was to deliberately trigger failed transactions and inspect them. Not handle them gracefully. Break them intentionally , on purpose, and then read the wreckage.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More