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

Improve error message when using mixed $ entries #710

Open
ericanderson opened this issue Sep 23, 2024 · 0 comments
Open

Improve error message when using mixed $ entries #710

ericanderson opened this issue Sep 23, 2024 · 0 comments
Milestone

Comments

@ericanderson
Copy link
Member

ericanderson commented Sep 23, 2024

https://github.com/palantir/osdk-ts/blob/main/packages/client/src/internal/conversions/modernToLegacyWhereClause.ts#L130-L137

Report was need to change:

$(Thing).where({
    age: {
        $gte: start;
        $lte: end;
    }
})

to

$(Thing).where({
  $and: [
    { age: { $gte: start } },
    { age: { $lte: end } }
  ]
}) 

Error message currently says:
Uncaught Error: Invariant failed: WhereClause Filter with multiple clauses isn't allowed

@ericanderson ericanderson added this to the 2.1.0 milestone Oct 29, 2024
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