getErrorByCode function
Implementation
ErrorResponse getErrorByCode(int code) {
final match = STANDARD_ERROR_MAP.entries.where((e) => e.value.code == code);
if (match.isEmpty) {
return STANDARD_ERROR_MAP[DEFAULT_ERROR]!;
}
return match.first.value;
}