For error matching we have to compare strings on the ModuleError (see related issue #313). We do this by printing the debug variant of the generated Error field (see here) but there is also no easy way to extract the pallet name which requires us to hard-code the string (see here). I'm not quite sure what better matching support would look like but a nice in-between step for our usage would be to simply extract the name into a constant.
For error matching we have to compare strings on the
ModuleError(see related issue #313). We do this by printing the debug variant of the generatedErrorfield (see here) but there is also no easy way to extract the pallet name which requires us to hard-code the string (see here). I'm not quite sure what better matching support would look like but a nice in-between step for our usage would be to simply extract the name into a constant.