🤖 Written by Claude
Condition text search hits ValueError: 'MPATH' is not a valid OntologyService when normalising a term whose prefix (MPATH) isn't in the OntologyService enum.
Seen on sharianttest and another deployment. Either add MPATH to the supported services or handle/skip unknown prefixes gracefully in condition text search.
Location: classification/models/condition_text_search.py:22 → ontology/models/models_ontology.py:308 (normalize)
Rollbar:
(Filed from a 6-month Rollbar triage.)
Second failure mode in the same function (added during triage):
condition_text_search() also calls .json() directly on the Monarch API response with no guard. The Monarch /v3/api/search endpoint intermittently returns errors or a non-JSON error page (e.g. a 502 HTML page), so .json() raises JSONDecodeError: Expecting value: line 2 column 1 and aborts the whole condition search before normalize() is ever reached.
Both are fragilities in the same condition_text_search() function and are addressed together in #1607.
🤖 Written by Claude
Condition text search hits
ValueError: 'MPATH' is not a valid OntologyServicewhen normalising a term whose prefix (MPATH) isn't in theOntologyServiceenum.Seen on sharianttest and another deployment. Either add MPATH to the supported services or handle/skip unknown prefixes gracefully in condition text search.
Location:
classification/models/condition_text_search.py:22→ontology/models/models_ontology.py:308(normalize)Rollbar:
(Filed from a 6-month Rollbar triage.)
Second failure mode in the same function (added during triage):
condition_text_search()also calls.json()directly on the Monarch API response with no guard. The Monarch/v3/api/searchendpoint intermittently returns errors or a non-JSON error page (e.g. a502HTML page), so.json()raisesJSONDecodeError: Expecting value: line 2 column 1and aborts the whole condition search beforenormalize()is ever reached.JSONDecodeErroratcondition_text_search.py:18(.json()), vsValueErrorat line 22 (get_or_stub→normalize).Both are fragilities in the same
condition_text_search()function and are addressed together in #1607.