Actions
Bug #7166
open[API] specifying an invalid filter should result in an error
Story points:
-
Release:
Release relationship:
Auto
Description
This invalid filter
api_client.collections().list(filters=[['portable_data_hash', 'somepdhoranother+size']], select=['portable_data_hash', 'uuid'], limit=100000).execute()
is simply ignored; the query above returns all collections. Our SDK should probably throw an exception - or at least print a warning when an invalid filter is ignored.
api_client.collections().list(filters=[['portable_data_hash', '=', 'somepdhoranother+size']], select=['portable_data_hash', 'uuid'], limit=100000).execute()
the above filter is correct and works as expected.
Updated by Brett Smith over 9 years ago
- Subject changed from [SDKs] specifying an invalid filter should result in an error to [API] specifying an invalid filter should result in an error
Certain kinds of specific invalid filters will cause the API server to raise an exception and return 422. See all the raise ArgumentError
in src:/services/api/lib/record_filters.rb. I think we probably want to extend that behavior to all kinds of invalid filters.
I notice that there is no default case to handle unknown operators. That's why the first case is being silently ignored: it doesn't recognize the PDH as an operator, so it just ignores the filter.
Updated by Brett Smith over 9 years ago
- Target version changed from Bug Triage to Arvados Future Sprints
Updated by Brett Smith over 8 years ago
Updated by Ward Vandewege over 3 years ago
- Target version deleted (
Arvados Future Sprints)
Actions