{"record":{"id":"43ffa1b79c196243","repo":"can1357/oh-my-pi","slug":"the-defunct-public-endpoint-cannot-be-used","errorCode":null,"errorMessage":"the defunct public endpoint cannot be used","messagePattern":"the defunct public endpoint cannot be used","errorType":"exception","errorClass":"DestinationUnavailableError","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/blob-broker/uploaders-legacy.ts","lineNumber":80,"sourceCode":"\tconst raw = optionString(config, \"endpoint\")?.trim();\n\tif (!raw) {\n\t\tthrow new DestinationUnavailableError(destination, \"a user-supplied replacement endpoint is required\");\n\t}\n\tlet endpoint: URL;\n\ttry {\n\t\tendpoint = new URL(raw);\n\t} catch (error) {\n\t\tthrow new LegacyDestinationError(destination, \"the configured endpoint is not a valid URL\", error);\n\t}\n\tif (endpoint.protocol !== \"https:\" && endpoint.protocol !== \"http:\") {\n\t\tthrow new LegacyDestinationError(destination, \"the configured endpoint must use HTTP or HTTPS\");\n\t}\n\tconst hostname = endpoint.hostname.toLowerCase();\n\tconst blocked = BLOCKED_CUSTOM_HOSTS[destination];\n\tif (blocked) {\n\t\tfor (const domain of blocked) {\n\t\t\tif (hostname === domain || hostname.endsWith(`.${domain}`)) {\n\t\t\t\tthrow new DestinationUnavailableError(destination, \"the defunct public endpoint cannot be used\");\n\t\t\t}\n\t\t}\n\t}\n\treturn endpoint;\n}\n\nfunction sendSpaceEndpoint(config: DestinationRuntimeConfig): URL {\n\tconst endpoint = configuredEndpoint(\"sendspace\", config);\n\tif (endpoint.hostname.toLowerCase() === SENDSPACE_DEFAULT_HOST) {\n\t\tthrow new DestinationUnavailableError(\"sendspace\", \"the deprecated public discovery endpoint cannot be used\");\n\t}\n\treturn endpoint;\n}\n\nfunction httpUrl(destination: BlobDestinationId, raw: string, base?: URL): string {\n\tlet url: URL;\n\ttry {\n\t\turl = base ? new URL(raw, base) : new URL(raw);","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/blob-broker/uploaders-legacy.ts#L62-L98","documentation":"This DestinationUnavailableError is thrown when the configured custom endpoint's hostname matches a blocked domain (or subdomain of it) for the destination — the defunct public service hosts listed in BLOCKED_CUSTOM_HOSTS (e.g. puush.me, mediafire.com, transfer.sh). The library blocks these because the services are shut down and the endpoint would never work, so it fails fast with a clear reason instead of a confusing network error.","triggerScenarios":"Configuring a destination with its own defunct public host, exactly or as a subdomain: e.g. puush endpoint 'https://puush.me/api/up', transfer-sh endpoint 'https://transfer.sh/xxx', or 'https://old.mediafire.com/api' — configuredEndpoint() lowercases the hostname and compares equality or `.endsWith('.'+domain)`.","commonSituations":"Users restore old configuration pointing at the original service after it shut down; documentation or blog posts still referencing the dead public API; assuming a subdomain of the dead host still works.","solutions":["Point the endpoint at a working self-hosted or third-party replacement host, not the original defunct domain","Remove any subdomain of the blocked domain (e.g. api.puush.me is also blocked)","Consult the destination list in BLOCKED_CUSTOM_HOSTS (uploaders-legacy.ts) to see which hosts are disallowed","If a mirror of the service exists, use its current non-blocked hostname"],"exampleFix":"// before\nendpoint: https://puush.me/api/up\n// after\nendpoint: https://my-own-host.example.com/api/up","handlingStrategy":"validation","validationCode":"const blocked = { puush: [\"puush.me\"], \"transfer-sh\": [\"transfer.sh\"] };\nconst host = new URL(config.endpoint).hostname.toLowerCase();\nfor (const [dest, domains] of Object.entries(blocked)) {\n  if (domains.some(d => host === d || host.endsWith(\".\" + d))) {\n    throw new Error(`${dest}: endpoint ${host} is a defunct public host; supply a replacement`);\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  await uploader.upload(request);\n} catch (err) {\n  if (err instanceof Error && err.message.includes(\"defunct public endpoint\")) {\n    // repoint endpoint at a working replacement host\n  } else throw err;\n}","preventionTips":["Never configure a destination with its own defunct public domain","Check the BLOCKED_CUSTOM_HOSTS list before choosing a replacement endpoint","Avoid subdomains of dead hosts — they are blocked too","Migrate configs when a public service announces shutdown"],"tags":["configuration","deprecated-service","endpoint","upload"],"backgroundTag":"deprecated-endpoint-blocked","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}