Opened 4 weeks ago

Closed 4 weeks ago

#36995 closed Uncategorized (invalid)

Improve KeyError message in Form.__getitem__

Reported by: shiva Owned by:
Component: Uncategorized Version: 6.0
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Currently, Form.getitem raises a KeyError with a message that may be unclear.

Proposed improvement:
Make the error message more descriptive by explicitly stating that the field is not found in the form and listing available fields.

I have a working patch with updated tests.

Change History (1)

comment:1 by Simon Charette, 4 weeks ago

Resolution: invalid
Status: newclosed

Currently, Form.getitem raises a KeyError with a message that may be unclear.

You have not explained how or in which context this might be case so it's unclear what problem you are trying to solve here.

Note: See TracTickets for help on using tickets.
Back to Top