Summary
The errors enum is missed from being generated in types.rs file
#[error_code]
pub enum SCError {
#[msg("Unauthorized signer")]
Unauthorized,
#[msg("Limit exceeded")]
Exceeded,
}
This limits experience of program fails with custom errors validation
Basic Example
Ability to compare get_custom_error_code() with enum instead of hardcoded codes
if res.is_success() {
} else if res.get_custom_error_code() == Some(SCError::Unauthorized) {
} else if res.get_custom_error_code() == Some(SCError::Exceeded) {
} else {
}
Drawbacks
No response
Unresolved questions
No response
Implementation PR
No response
Reference Issues
No response
Summary
The errors enum is missed from being generated in
types.rsfileThis limits experience of program fails with custom errors validation
Basic Example
Ability to compare
get_custom_error_code()with enum instead of hardcoded codesDrawbacks
No response
Unresolved questions
No response
Implementation PR
No response
Reference Issues
No response