Issue #4780
Task 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.
Subtasks
Related issues
Associated revisions
History
#1
Updated by kersom almost 2 years ago
- Related to Test #4230: Test task name and search for task based on their name added
#2
Updated by amacdona@redhat.com almost 2 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
#3
Updated by bherring almost 2 years ago
- Related to Issue #4857: Pulp 2 Nightly Regression in test_iso_crud.ISOUpdateTestCase.test_all added
#4
Updated by fao89 over 1 year ago
- Status changed from NEW to POST
- Assignee set to fao89
#5
Updated by Anonymous over 1 year ago
- Status changed from POST to MODIFIED
Applied in changeset pulpcore|eb1760d867e833bd68406e626ac5427fdb599d6d.
#6
Updated by bmbouter about 1 year ago
- Sprint/Milestone set to 3.0.0
#7
Updated by bmbouter about 1 year ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Please register to edit this issue
Raise meaningful error for invalid filters
closes #4780 https://pulp.plan.io/issues/4780