public ActionResult <EmployeeResponse> GetEmployeeByDocument(string number) { try { var employeeDocument = _mapper.Map <DocumentRequest, Document>(new DocumentRequest(number, (int)DocumentEnumUI.CPF)); if (employeeDocument.Notifications.Any()) { return(CustomResponse(employeeDocument.Notifications)); } var result = _employeeAppService.GetEmployeeByDocument(employeeDocument); var listEmployeeResponse = _mapper.Map <Employee, EmployeeResponse>(result); return(CustomResponse(listEmployeeResponse)); } catch (Exception ex) { MessageException(); return(CustomExceptionResponse()); } }