This PR adds a validation check for cursor and makes sure it's a string at runtime. Non-string values can produce vague error messages otherwise.
Description
This PR follows the current client configuration validation pattern to make sure cursor is a string when it is set.
Motivation and context
While testing this change internally, we discovered if you managed to pass a non-string cursor during runtime, the error returned wasn't very helpful. It's probably easiest to mitigate this by validating it.
How was the change tested?
Added a test to the existing client configuration tests. The existing tests still pass.
Change types
[X] Bug fix (non-breaking change that fixes an issue)
[ ] New feature (non-breaking change that adds functionality)
[ ] Breaking change (backwards-incompatible fix or feature)
Checklist:
[X] My code follows the code style of this project.
[ ] My change requires a change to Fauna documentation.
[ ] My change requires a change to the README, and I have updated it accordingly.
This PR adds a validation check for cursor and makes sure it's a string at runtime. Non-string values can produce vague error messages otherwise.
Description
This PR follows the current client configuration validation pattern to make sure
cursor
is a string when it is set.Motivation and context
While testing this change internally, we discovered if you managed to pass a non-string cursor during runtime, the error returned wasn't very helpful. It's probably easiest to mitigate this by validating it.
How was the change tested?
Added a test to the existing client configuration tests. The existing tests still pass.
Change types
Checklist: