Issue #4780
closedTask search by invalid field should raise meaningful error
Description
Reference and discussion: https://github.com/pulp/pulpcore/pull/115#issuecomment-488880787
When we request:
/pulp/api/v3/tasks/?name=pulpcore.app.tasks.repository.update
We get the correct results of all update tasks.
But if we request an invalid field name:
/pulp/api/v3/tasks/?invalidfield=foobar
Or an invalid value to a proper field like the escaped `+`
/pulp/api/v3/tasks/?name=+'
We get all results, the same result if I simply request /pulp/api/v3/tasks/ without params.
What I expected was to see an error like:
Invalid Field name
And for the second case to get `0` results.
Related issues
Updated by kersom over 5 years ago
- Related to Test #4230: Test task name and search for task based on their name added
Updated by amacdona@redhat.com over 5 years ago
- Triaged changed from No to Yes
IMO this is a valid issue, but since our filter functionality comes from Django Rest Framework, I'm not sure if this can be done cleanly. If there is a DRF configuration that we can add to fix this across the board, 1, otherwise we should bump this to 3.1
Updated by bherring over 5 years ago
- Related to Issue #4857: Pulp 2 Nightly Regression in test_iso_crud.ISOUpdateTestCase.test_all added
Updated by fao89 about 5 years ago
- Status changed from NEW to POST
- Assignee set to fao89
Added by Fabricio Aguiar about 5 years ago
Updated by Anonymous about 5 years ago
- Status changed from POST to MODIFIED
Applied in changeset pulpcore|eb1760d867e833bd68406e626ac5427fdb599d6d.
Updated by bmbouter almost 5 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Updated by bmbouter over 4 years ago
- Category deleted (
14)
We are removing the 'API' category per open floor discussion June 16, 2020.
Raise meaningful error for invalid filters
closes #4780 https://pulp.plan.io/issues/4780