#37327: Improve IncorrectLookupParameters admin error message
-------------------------------------+-------------------------------------
Reporter: Tim Schilling | Owner: Md.
Type: | Saikat Islam
Cleanup/optimization | Status: assigned
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: messaging | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Md. Saikat Islam):
the `changelist_view` uses creates a `get_changelist_instance` and that
method calls many methods inside ChangeList class in `view/main.py`. I
inspected that, inside these two files most of the times we have raised
`IncorrectLookupParameters` error, for e.g `FieldDoesNotExist`,
`ValueError`.
Heres my anaylisis on this, when we first catch the
IncorrectLookupParameters we consider it the users fault, and pass a flag
(value is actually 'e=' in code, the comment is stale to have 'invalid='.
And after a fresh redirect, when we again has IncorrectLookupParameters
error, we are sure that, its not problem in request params, its maybe our
raised errors.
So, I am now confidence that the "database error" is not correct. Best, we
use "Server error" in when we have error after the flag set.
--
Ticket URL: <
https://code.djangoproject.com/ticket/37327#comment:7>