{"record":{"id":"fe6851dc7073f2b5","repo":"OpenBB-finance/OpenBB","slug":"commodity-v-is-not-supported-please-choose-fr","errorCode":null,"errorMessage":"Commodity '{v}' is not supported. Please choose from the available commodities -> {commodities}","messagePattern":"Commodity '(.+?)' is not supported\\. Please choose from the available commodities -> (.+?)","errorType":"validation","errorClass":"OpenBBError","httpStatus":null,"severity":"error","filePath":"openbb_platform/providers/government_us/openbb_government_us/models/commodity_psd_report.py","lineNumber":98,"sourceCode":"                ],\n            },\n        },\n    }\n\n    @field_validator(\"year\", mode=\"before\", check_fields=False)\n    @classmethod\n    def _validate_year(cls, v):\n        \"\"\"Validate year is >= 2006.\"\"\"\n        if v < 2006:\n            raise OpenBBError(ValueError(\"Data is only available from 2006 onwards.\"))\n        return v\n\n    @field_validator(\"commodity\", mode=\"before\", check_fields=False)\n    @classmethod\n    def _validate_commodity(cls, v):\n        \"\"\"Validate commodity is in the list.\"\"\"\n        if v.lower() not in COMMODITIES:\n            raise OpenBBError(\n                ValueError(\n                    f\"Commodity '{v}' is not supported. \"\n                    + \"Please choose from the available commodities -> \"\n                    + f\"{', '.join(COMMODITIES.keys())}\"\n                )\n            )\n        return v.lower()\n\n\nclass GovernmentUsCommodityPsdReportData(CommodityPsdReportData):\n    \"\"\"US Government Commodity PSD Report Data.\"\"\"\n\n    data_format: dict[str, str] = Field(\n        description=\"Data format information.\",\n        default_factory=lambda: {\n            \"data_type\": \"pdf\",\n            \"filename\": \"commodity_psd_report.pdf\",\n        },","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/government_us/openbb_government_us/models/commodity_psd_report.py#L80-L116","documentation":"Error \"Commodity '{v}' is not supported. Please choose from the available commodities -> {commodities}\" thrown in OpenBB-finance/OpenBB.","triggerScenarios":"Thrown at openbb_platform/providers/government_us/openbb_government_us/models/commodity_psd_report.py:98 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Choose a commodity from the listed available commodities.","Check spelling of the commodity name."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}