🤖 Written by Claude
The classification export API accepts a debug allele= query param which is parsed with a bare int(allele_str) in ClassificationFilter.from_request (classification/views/exports/classification_export_filter.py:476). A non-numeric value raises ValueError and 500s the export endpoint.
Crucially, a is the allele shortcut used in search (e.g. searching a9678 resolves allele 9678), so users naturally pass allele=a9678. Rather than just rejecting it, the export form should accept that shortcut:
- strip a leading
a (so a9678 and 9678 both resolve to allele 9678), consistent with search;
- validate the remainder is an integer;
- return a clean 400 for genuinely invalid input instead of a 500.
Seen on shariant / sharianttest:
Split out of #1601 (which now covers only the genome-build and grouping-id 404 cases).
🤖 Written by Claude
The classification export API accepts a debug
allele=query param which is parsed with a bareint(allele_str)inClassificationFilter.from_request(classification/views/exports/classification_export_filter.py:476). A non-numeric value raisesValueErrorand 500s the export endpoint.Crucially,
ais the allele shortcut used in search (e.g. searchinga9678resolves allele 9678), so users naturally passallele=a9678. Rather than just rejecting it, the export form should accept that shortcut:a(soa9678and9678both resolve to allele 9678), consistent with search;Seen on shariant / sharianttest:
Split out of #1601 (which now covers only the genome-build and grouping-id 404 cases).