-
-
Notifications
You must be signed in to change notification settings - Fork 734
Closed
Labels
a: informationRelated to information commands: (doc, help, information, reddit, site, tags)Related to information commands: (doc, help, information, reddit, site, tags)p: 3 - lowLow PriorityLow Prioritys: WIPWork In ProgressWork In Progresst: bugSomething isn't workingSomething isn't working
Description
Currently, the PEP command assumes that if a metadata field is present in the PEP's summary table that the value is populated:
Lines 64 to 72 in 74d9905
| # Add the interesting information | |
| if "Status" in pep_header: | |
| pep_embed.add_field(name="Status", value=pep_header["Status"]) | |
| if "Python-Version" in pep_header: | |
| pep_embed.add_field(name="Python-Version", value=pep_header["Python-Version"]) | |
| if "Created" in pep_header: | |
| pep_embed.add_field(name="Created", value=pep_header["Created"]) | |
| if "Type" in pep_header: | |
| pep_embed.add_field(name="Type", value=pep_header["Type"]) |
However, this is not always the case, e.g. PEP 249:
Because of this, the embed field's value can be provided an empty string, causing an exception to be raised:
HTTPException: 400 BAD REQUEST (error code: 50035): Invalid Form Body
In embed.fields.1.value: This field is required
To fix this, there should be a catch for empty values to prevent a field being added if there's no value to populate.
Metadata
Metadata
Assignees
Labels
a: informationRelated to information commands: (doc, help, information, reddit, site, tags)Related to information commands: (doc, help, information, reddit, site, tags)p: 3 - lowLow PriorityLow Prioritys: WIPWork In ProgressWork In Progresst: bugSomething isn't workingSomething isn't working
