errorCode property

String? get errorCode

错误码(便捷访问)

Implementation

String? get errorCode {
  final e = error;
  if (e is BusinessError) return e.code;
  if (e is ResponseError) return e.statusCode.toString();
  return e?.runtimeType.toString();
}