{"record":{"id":"930b1a132f77f3b3","repo":"BerriAI/litellm","slug":"major-airlines-json-not-found","errorCode":null,"errorMessage":"major_airlines.json not found","messagePattern":"major_airlines\\.json not found","errorType":"http","errorClass":"HTTPException","httpStatus":404,"severity":"error","filePath":"litellm/proxy/guardrails/guardrail_endpoints.py","lineNumber":1476,"sourceCode":"@router.get(\n    \"/guardrails/ui/major_airlines\",\n    tags=[\"Guardrails\"],\n    dependencies=[Depends(user_api_key_auth)],\n)\nasync def get_major_airlines():\n    \"\"\"\n    Get the major airlines list from IATA (competitor intent, airline type).\n    Returns airline id, match variants (pipe-separated), and tags.\n    \"\"\"\n    airlines_path: Final = os.path.join(\n        os.path.dirname(__file__),\n        \"guardrail_hooks\",\n        \"litellm_content_filter\",\n        \"competitor_intent\",\n        \"major_airlines.json\",\n    )\n    if not os.path.exists(airlines_path):\n        raise HTTPException(\n            status_code=404,\n            detail=\"major_airlines.json not found\",\n        )\n    try:\n        with open(airlines_path, \"r\", encoding=\"utf-8\") as f:\n            import json\n\n            airlines: Final = json.load(f)\n        return {\"airlines\": airlines}\n    except Exception as e:\n        raise HTTPException(status_code=500, detail=f\"Error reading major_airlines.json: {e}\") from e\n\n\n@router.post(\n    \"/guardrails/validate_blocked_words_file\",\n    tags=[\"Guardrails\"],\n    dependencies=[Depends(user_api_key_auth)],\n)","sourceCodeStart":1458,"sourceCodeEnd":1494,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/guardrails/guardrail_endpoints.py#L1458-L1494","documentation":"Raised by the major-airlines guardrail UI endpoint when the packaged competitor-intent data file (guardrail_hooks/litellm_content_filter/competitor_intent/major_airlines.json) is unexpectedly absent from the installation. Delivered as 404; it indicates a broken/incomplete package install rather than any caller error — the file ships with LiteLLM.","triggerScenarios":"Thrown at litellm/proxy/guardrails/guardrail_endpoints.py:1476 when the library encounters an invalid state.","commonSituations":"The bundled major_airlines.json data file is missing from the installation.","solutions":["Ensure major_airlines.json is present in the expected package data directory.","Reinstall the litellm package if data files are missing."],"exampleFix":"pip install --force-reinstall litellm","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}