fromCode static method
Find Error by error code string
Implementation
static OsmosErrorCodes? fromCode(String? code) {
if (code == null) return null;
try {
return OsmosErrorCodes.values.firstWhere((e) => e.code == code);
} catch (e) {
return null;
}
}