opensearch-project / opensearch-py

Python Client for OpenSearch
https://opensearch.org/docs/latest/clients/python/
Apache License 2.0
338 stars 170 forks source link

Added fix for key error because of missing 'hits' key. #616

Closed Djcarrillo6 closed 10 months ago

Djcarrillo6 commented 10 months ago

Description

Adds graceful/defensive code for handling case of missing "hits" key in scan response.

Issues Resolved

Closes #313

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.

codecov[bot] commented 10 months ago

Codecov Report

Attention: 13 lines in your changes are missing coverage. Please review.

Comparison is base (6f26eb3) 71.98% compared to head (fad9307) 72.12%. Report is 2 commits behind head on main.

Files Patch % Lines
opensearchpy/_async/helpers/actions.py 0.00% 7 Missing :warning:
opensearchpy/helpers/actions.py 14.28% 6 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #616 +/- ## ========================================== + Coverage 71.98% 72.12% +0.14% ========================================== Files 89 89 Lines 7935 7939 +4 ========================================== + Hits 5712 5726 +14 + Misses 2223 2213 -10 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.