extractErrorCode function

int extractErrorCode(
  1. Map<String, dynamic>? body
)

Implementation

int extractErrorCode(Map<String, dynamic>? body) {
  if (body != null && body.containsKey('code')) {
    final String code = body['code']?.toString() ?? '';
    return int.tryParse(code) ?? 11;
  } else {
    return 11;
  }
}