{"record":{"id":"ac746c77b06a3feb","repo":"gitroomhq/postiz-app","slug":"unsupported-storage-provider-provider","errorCode":null,"errorMessage":"Unsupported storage provider: ${provider}","messagePattern":"Unsupported storage provider: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"libraries/react-shared-libraries/src/helpers/uppy.upload.ts","lineNumber":106,"sourceCode":"          completeMultipartUpload: (file: any, props: any) =>\n            fetchUploadApiEndpoint(fetch, 'complete-multipart-upload', {\n              file,\n              ...props,\n            }),\n        },\n      };\n    case 'local':\n      return {\n        plugin: XHRUpload,\n        options: {\n          endpoint: `${backendUrl}/media/upload-server`,\n          withCredentials: true,\n        },\n      };\n\n    // Add more cases for other cloud providers\n    default:\n      throw new Error(`Unsupported storage provider: ${provider}`);\n  }\n};\n","sourceCodeStart":88,"sourceCodeEnd":109,"githubUrl":"https://github.com/gitroomhq/postiz-app/blob/0f1647f7491a217d43eb5ae7a480484bdf0aff3e/libraries/react-shared-libraries/src/helpers/uppy.upload.ts#L88-L109","documentation":"getUppyUploadPlugin maps the configured storage provider to an Uppy plugin and throws for any provider string without a case. It's a frontend configuration error: STORAGE_PROVIDER (or equivalent env) doesn't match the supported set (e.g. 'cloudflare'/'s3'/'local' depending on the switch).","triggerScenarios":"Building the Uppy uploader with a provider value that has no switch case: typo ('Cloudflare'), unsupported provider ('azure'), or undefined/empty string falling through to default.","commonSituations":"Misconfigured STORAGE_PROVIDER env var in the frontend build; deploying a new backend storage backend without adding the frontend case; env var name change between versions leaving the value undefined.","solutions":["Check the exact provider string passed in (log it) and fix the env var value to a supported one","If the provider is genuinely supported server-side, add a matching case in getUppyUploadPlugin","Verify the env var is present at frontend build time (Vite requires it at build, not runtime)","Guard upstream: validate the provider against a known list before calling getUppyUploadPlugin"],"exampleFix":"// before\nthrow new Error(`Unsupported storage provider: ${provider}`);\n\n// after: validate before use + clearer default\nconst SUPPORTED = ['local', 'cloudflare', 's3'] as const;\nif (!SUPPORTED.includes(provider)) {\n  throw new Error(\n    `Unsupported storage provider: ${provider}. Supported: ${SUPPORTED.join(', ')} (check STORAGE_PROVIDER)`\n  );\n}","handlingStrategy":"type-guard","validationCode":"const SUPPORTED_PROVIDERS = ['local', 'cloudflare', 's3'] as const;\nconst isSupportedProvider = (p: unknown): p is typeof SUPPORTED_PROVIDERS[number] =>\n  SUPPORTED_PROVIDERS.includes(p as any);","typeGuard":"const isSupportedProvider = (p: unknown): p is 'local' | 'cloudflare' | 's3' => ['local','cloudflare','s3'].includes(p as string);","tryCatchPattern":"null","preventionTips":["Validate STORAGE_PROVIDER at build time","Fail fast at app startup on invalid provider config","Add the frontend case whenever a backend storage backend is added"],"tags":["uppy","upload","configuration","frontend"],"backgroundTag":"unsupported-storage-provider","analyzedSha":"0f1647f7491a217d43eb5ae7a480484bdf0aff3e","analyzedAt":"2026-08-27T12:09:55.020Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}