Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate cursor for feeds #296

Merged
merged 1 commit into from
Nov 4, 2024
Merged

Validate cursor for feeds #296

merged 1 commit into from
Nov 4, 2024

Conversation

ecooper
Copy link
Contributor

@ecooper ecooper commented Nov 4, 2024

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

    • 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:

    • 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.

Copy link
Contributor

@ptpaterson ptpaterson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍬 LGTM

@ecooper ecooper merged commit 19458fe into main Nov 4, 2024
7 checks passed
@ecooper ecooper deleted the FE-6090 branch November 4, 2024 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants