handleServicesError function

void handleServicesError(
  1. Object aggregatedErrors
)

Implementation

void handleServicesError(Object aggregatedErrors) {
  print(aggregatedErrors.runtimeType);
  if (aggregatedErrors.runtimeType == ServiceError) {
    throw SimpleError('Todos os serviços de CEP retornaram erro.');
  }

  throw aggregatedErrors;
}