public ActionResult <CompanyResponse> GetCompanyByDocument(string number) { try { var companyDocument = _mapper.Map <DocumentRequest, Document>(new DocumentRequest(number, (int)DocumentEnumUI.CPF)); if (companyDocument.Notifications.Any()) { return(CustomResponse(companyDocument.Notifications)); } var result = _companyAppService.GetCompanyByDocument(companyDocument); var listCompanyResponse = _mapper.Map <Company, CompanyResponse>(result); return(CustomResponse(listCompanyResponse)); } catch (Exception ex) { MessageException(); return(CustomExceptionResponse()); } }