Remove redundant code from error-handling code in GlobalSearch (#1170)

* remove a redundant retry

* semver

* formatting

---------

Co-authored-by: Alonso Guevara <alonsog@microsoft.com>
This commit is contained in:
Chris Trevino 2024-09-20 10:29:56 -07:00 committed by GitHub
parent 16b4ea5dc9
commit 1dbcc42b81
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 9 deletions

View File

@ -0,0 +1,4 @@
{
"type": "patch",
"description": "remove redundant error-handling code from global-search"
}

View File

@ -219,15 +219,10 @@ class GlobalSearch(BaseSearch):
# parse search response json
processed_response = self.parse_search_response(search_response)
except ValueError:
# Clean up and retry parse
try:
# parse search response json
processed_response = self.parse_search_response(search_response)
except ValueError:
log.warning(
"Warning: Error parsing search response json - skipping this batch"
)
processed_response = []
log.warning(
"Warning: Error parsing search response json - skipping this batch"
)
processed_response = []
return SearchResult(
response=processed_response,