You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should we make it a best practice to always surround mutations in a try catch? We need to ensure we never get into an inconsistent state?
Canisters need to be very careful when trapping, and I believe when an error is thrown in Boa then the canister will panic thus causing a trap. This could lead to inconsistent behavior if there have a been any cross-canister calls, as the state before the call will have been committed but not the state after the call.
For now I am doing all mutations after any cross-canister calls, so any uncaught errors should wipe clean, but we should be aware of this and possibly come up with best practices.
The text was updated successfully, but these errors were encountered:
Should we make it a best practice to always surround mutations in a try catch? We need to ensure we never get into an inconsistent state?
Canisters need to be very careful when trapping, and I believe when an error is thrown in Boa then the canister will panic thus causing a trap. This could lead to inconsistent behavior if there have a been any cross-canister calls, as the state before the call will have been committed but not the state after the call.
For now I am doing all mutations after any cross-canister calls, so any uncaught errors should wipe clean, but we should be aware of this and possibly come up with best practices.
The text was updated successfully, but these errors were encountered: