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
The DSL is currently very lazy with error codes. We should do this properly, generating an error for each constraint, adding those to the IDL, and having all clients report typed, informative errors, when the runtime responds with a particular error code.
There's also some boilierplate we should eliminate with a macro when creating custom errors for programs.
The text was updated successfully, but these errors were encountered:
Part of this is addressed by #25. Namely, the ability to define custom, typed errors that propagate to the client.
The other part needed to be done is informative errors for the constraints in the #[derive(Accounts)] struct. Right now, we just return a bunch of useless ProgramError::Custom(1) errors.
armaniferrante
changed the title
Error code generation
Error codes for Accounts constraints
Jan 21, 2021
The DSL is currently very lazy with error codes. We should do this properly, generating an error for each constraint, adding those to the IDL, and having all clients report typed, informative errors, when the runtime responds with a particular error code.
There's also some boilierplate we should eliminate with a macro when creating custom errors for programs.
The text was updated successfully, but these errors were encountered: