query_with_cursor causing internal server error if kind is empty or does not exist
Type of change
-
Bug Fix -
Feature
Please provide link to gitlab issue or ADR(Architecture Decision Record)
Does this introduce a change in the core logic?
- [YES]
Does this introduce a change in the cloud provider implementation, if so which cloud?
-
Common code
Does this introduce a breaking change?
- [NO]
What is the current behavior?
- query_with_cursor could cause an internal server error with subsequent requests if the kind does not exist.
check
if (results != null)
is always true, even when there is no result, the code that should be executed and return the null
cursor is never reached.
- Tests for the Search service cursor query were insufficient to cover this scenario.
What is the new/expected behavior?
- query_with_cursor returning
null
cursor if there were no values. - Tests are covering such scenarios.
Have you added/updated Unit Tests and Integration Tests?
Yes
Any other useful information
Edited by Rustam Lotsmanenko (EPAM)