Skip to content

If a serializable value is provided as a SearchAttribute, serialize it instead of throwing the error: "SearchAttribute values must arrays of strings, numbers, booleans, or Dates. The value * at index 0 is of type object" #1715

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

Open
JCMais opened this issue May 14, 2025 · 0 comments

Comments

@JCMais
Copy link

JCMais commented May 14, 2025

If an object is passed as a SearchAttribute, and it is not a Date, and it has a toJSON method, the toJSONmethod should be called, and only then should the validation happen.

E.g: this allows passing MongoDB ObjectIds as search attributes, as they have a toJSON that serializes to a String.

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

No branches or pull requests

1 participant