Skip to content

Conversation

@lazka
Copy link
Contributor

@lazka lazka commented May 5, 2025

Change Summary

In case generateScopedSearchKey() is called with an empty parameters array the json encoding would result in '[]' which results in a broken scoped key and an unhelpful 401 permission error from typesense.

Cast input to an object, so we end up with '{}' for that case.

PR Checklist

In case generateScopedSearchKey() is called with an empty parameters
array the json encoding would result in '[]' which results in a broken
scoped key and an unhelpful 401 permission error from typesense.

Cast input to an object, so we end up with '{}' for that case.
@tharropoulos
Copy link
Contributor

Nice! Thanks for adding the test as well

@jasonbosco lgtm

@jasonbosco jasonbosco merged commit 0e8dee5 into typesense:master May 5, 2025
1 check passed
@jasonbosco
Copy link
Member

Thank you for the PR!

Published this in v5.1.0

@lazka
Copy link
Contributor Author

lazka commented May 6, 2025

Thanks!

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.

3 participants