translateErrorMessage function

String? translateErrorMessage(
  1. Map<String, dynamic> errorResponse
)

Implementation

String? translateErrorMessage(Map<String, dynamic> errorResponse) {
  try {
    return errorResponse['soap:Envelope']['soap:Body']['soap:Fault']
        ['faultstring'];
  } catch (e) {
    throw SimpleError('Erro ao se conectar com o serviço Correios');
  }
}