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

How to return an error when creating a filter with faulty values ? #32

Closed
BobbyLarone opened this issue Jul 2, 2021 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@BobbyLarone
Copy link

I've encounterd something very strange..
When i'm trying to execute a GET request to retrieve a list of items, i can also specify a filter but when those values are wrong ( ex. guid == leaves) the result still gives me a complete list with all the entities back from the database. ( ex. GetUsers returns all the users)

It looks like there is no validation on the filters.
How do i return an error when the result of the filter returns nothing?

@BobbyLarone BobbyLarone added documentation Improvements or additions to documentation question Further information is requested labels Jul 2, 2021
@pdevito3 pdevito3 added bug Something isn't working and removed documentation Improvements or additions to documentation question Further information is requested labels Jul 4, 2021
@pdevito3 pdevito3 self-assigned this Jul 4, 2021
@pdevito3
Copy link
Owner

pdevito3 commented Jul 4, 2021

Just gave this a shot and it looks like it works fine for non-guids (returns an empty list when no records match the filter), but does indeed not work for guid fields. This is a bug in Sieve. I submitted a ticket to them. Will try and submit a PR to them myself at some point, but if you want to as well, go for it!

Closing this as it is not necessarily an issue with craftsman as much as Sieve. Thanks for submitting this though!

@pdevito3 pdevito3 closed this as completed Jul 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants