{"record":{"id":"1629bc12f6d6d310","repo":"can1357/oh-my-pi","slug":"the-destination-is-classified-as-metadata-status","errorCode":null,"errorMessage":"the destination is classified as ${metadata.status}","messagePattern":"the destination is classified as (.+?)","errorType":"exception","errorClass":"DestinationUnavailableError","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/blob-broker/uploaders.ts","lineNumber":136,"sourceCode":"\t};\n}\n\n/**\n * Resolve one registry destination to its built-in uploader.\n *\n * Serving destinations deliberately return `null`; the broker selects those\n * through its separate serve-kind predicate. Registry entries known to be\n * unusable, and active entries without an implementation, fail explicitly\n * before an upload can issue a network request.\n */\nexport function createConfiguredUploader(\n\tdestination: BlobDestinationId,\n\tconfig: DestinationRuntimeConfig,\n): BlobUploader | null {\n\tconst metadata: BlobDestinationMetadata = BUILTIN_BLOB_DESTINATIONS[destination];\n\tif (metadata.status === \"incompatible\" || metadata.status === \"defunct\") {\n\t\tconst reason = metadata.reason ?? `the destination is classified as ${metadata.status}`;\n\t\tthrow new DestinationUnavailableError(destination, reason);\n\t}\n\n\tif (destination === \"command\") {\n\t\tconst command = optionString(config, \"command\");\n\t\tif (!command) {\n\t\t\tthrow new DestinationUnavailableError(destination, \"an upload command containing {file} is required\");\n\t\t}\n\t\treturn createCommandUploader(command);\n\t}\n\n\tconst uploader =\n\t\tcreateAnonymousUploader(destination, config) ??\n\t\tcreateImageHostUploader(destination, config) ??\n\t\tcreateCloudDriveUploader(destination, config) ??\n\t\tcreateObjectStorageUploader(destination, config) ??\n\t\tcreateSelfHostedUploader(destination, config) ??\n\t\tcreateLegacyUploader(destination, config) ??\n\t\tcreateDiscordUploader(destination, config);","sourceCodeStart":118,"sourceCodeEnd":154,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/blob-broker/uploaders.ts#L118-L154","documentation":"createConfiguredUploader looks up BUILTIN_BLOB_DESTINATIONS metadata for the requested destination and refuses to build an uploader when the destination is marked \"incompatible\" or \"defunct\". The thrown DestinationUnavailableError carries the cataloged reason, or this default message when the catalog has none. It means the destination is intentionally unsupported, not misconfigured.","triggerScenarios":"Selecting a destination id (in config or via the uploader() helper) whose catalog entry has status \"incompatible\" or \"defunct\" — e.g. a service that shut down or a protocol version the broker dropped. Passing such an id to createConfiguredUploader at any time raises it.","commonSituations":"Upgrading the CLI to a version that marked a previously working self-hosted destination defunct; copying a config from an old setup referencing a retired service; typos are NOT the cause here (typo yields a different lookup error).","solutions":["Switch config to a supported destination (e.g. another self-hosted uploader or the command destination)","Check the destination's metadata.reason in BUILTIN_BLOB_DESTINATIONS for the official explanation","Update or replace the discontinued server integration if a replacement exists","Pin to a version where the destination was still supported only as a temporary measure"],"exampleFix":"// before\n\"images\": { \"urls\": { \"destination\": \"defunct-service\" } }\n// after\n\"images\": { \"urls\": { \"destination\": \"command\", \"command\": \"curl -sF 'file=@{file}' https://0x0.st\" } }","handlingStrategy":"validation","validationCode":"import { BUILTIN_BLOB_DESTINATIONS } from \"...\";\nconst meta = BUILTIN_BLOB_DESTINATIONS[destination];\nif (meta.status === \"incompatible\" || meta.status === \"defunct\") {\n\t// choose another destination before configuring\n}","typeGuard":"function isUsableDestination(id: string): boolean {\n\tconst meta = BUILTIN_BLOB_DESTINATIONS[id as keyof typeof BUILTIN_BLOB_DESTINATIONS];\n\treturn meta !== undefined && meta.status !== \"incompatible\" && meta.status !== \"defunct\";\n}","tryCatchPattern":"try {\n\tconst uploader = createConfiguredUploader(destination, config);\n} catch (err) {\n\tif (err instanceof DestinationUnavailableError && /classified as (incompatible|defunct)/.test(err.message)) {\n\t\t// fall back to a supported destination per metadata.reason\n\t}\n\tthrow err;\n}","preventionTips":["Check the destination's status/reason in BUILTIN_BLOB_DESTINATIONS before configuring","After CLI upgrades, re-validate that configured destinations are still supported","Prefer stable destinations (command, active self-hosted) over retired services","Keep a fallback destination configured for image URL sharing"],"tags":["configuration","unsupported-destination","blob-broker"],"backgroundTag":"unsupported-destination","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}