{"record":{"id":"c5696bb4e0c95ed9","repo":"zylon-ai/private-gpt","slug":"unsupported-storage-provider-provider","errorCode":null,"errorMessage":"Unsupported storage provider: {provider}","messagePattern":"Unsupported storage provider: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"private_gpt/components/storage/storage_component.py","lineNumber":52,"sourceCode":"                return storage\n\n            match provider:\n                case \"local\":\n                    if local_root_path is None:\n                        raise ValueError(\n                            \"Local storage provider requires local_root_path\"\n                        )\n\n                    storage = LocalObjectStorage(root_path=local_root_path)\n                case \"s3\":\n                    if bucket_name is None:\n                        raise ValueError(\"S3 storage provider requires bucket_name\")\n                    storage = S3ObjectStorage(\n                        s3_helper=self._injector.get(S3Helper),\n                        bucket_name=bucket_name,\n                    )\n                case _:\n                    raise ValueError(f\"Unsupported storage provider: {provider}\")\n\n            self._storages[key] = storage\n            return storage\n","sourceCodeStart":34,"sourceCodeEnd":56,"githubUrl":"https://github.com/zylon-ai/private-gpt/blob/4a030776a31a901ad80b1bf4d7faa2c1a367efbb/private_gpt/components/storage/storage_component.py#L34-L56","documentation":"Raised by StorageComponent when the provider string does not match \"local\" or \"s3\" in the match statement. It exists to catch misspelled or outdated provider names at creation time instead of silently falling through. The invalid value is interpolated into the message.","triggerScenarios":"Calling get_storage with any provider other than exactly \"local\" or \"s3\" (e.g. \"Local\", \"filesystem\", \"gcs\", \"azure\"). Also triggered by config drift after upgrading, when a removed provider name is still in settings.","commonSituations":"Case mismatch in YAML (Local vs local); copy-paste from docs of a different storage abstraction; attempting to use an object-store backend the component never supported.","solutions":["Set the provider to exactly \"local\" or \"s3\" (lowercase) in configuration","Check for stray whitespace or casing in the configured value (e.g. ' s3' or 'S3')","If you need another backend, implement an ObjectStorage subclass and extend the match arms rather than passing an unknown string"],"exampleFix":"# before\nstorage: provider: filesystem\n# after\nstorage: provider: local\n  local_root_path: /var/lib/private_gpt/local_storage","handlingStrategy":"type-guard","validationCode":"SUPPORTED_PROVIDERS = {\"local\", \"s3\"}\n\nif settings.storage.provider not in SUPPORTED_PROVIDERS:\n    raise ValueError(f\"provider must be one of {sorted(SUPPORTED_PROVIDERS)}\")","typeGuard":"def is_supported_provider(provider: str) -> bool:\n    return provider in {\"local\", \"s3\"}","tryCatchPattern":null,"preventionTips":["Normalize provider strings with .strip().lower() before use","Pin supported values in config schema/docs so typos fail at lint time"],"tags":["storage","configuration","unsupported-provider","validation"],"backgroundTag":null,"analyzedSha":"4a030776a31a901ad80b1bf4d7faa2c1a367efbb","analyzedAt":"2026-08-15T03:51:26.951Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}