Is your feature request related to a problem? Please describe.
The SDK determines which type of error occurred within librustzcash by comparing the error message string:
Describe the solution you'd like
This is fragile, since if the error messages are changed in librustzcash, this code will break. In librustzcash, these error messages are defined in zcash client backend/src/scanning.rs.
This could be made less fragile by using integer codes for errors, exposing a method for determining the error type in the FFI, or by at least adding a comment to librustzcash warning against changing the error message strings.
Is your feature request related to a problem? Please describe.
The SDK determines which type of error occurred within librustzcash by comparing the error message string:
Describe the solution you'd like
This is fragile, since if the error messages are changed in librustzcash, this code will break. In librustzcash, these error messages are defined in zcash client backend/src/scanning.rs. This could be made less fragile by using integer codes for errors, exposing a method for determining the error type in the FFI, or by at least adding a comment to librustzcash warning against changing the error message strings.
Alternatives you've considered
Additional context