{"record":{"id":"d9b70b170390af99","repo":"can1357/oh-my-pi","slug":"the-deprecated-public-discovery-endpoint-cannot-be","errorCode":null,"errorMessage":"the deprecated public discovery endpoint cannot be used","messagePattern":"the deprecated public discovery endpoint cannot be used","errorType":"exception","errorClass":"DestinationUnavailableError","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/blob-broker/uploaders-legacy.ts","lineNumber":90,"sourceCode":"\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);\n\t} catch (error) {\n\t\tthrow new LegacyDestinationError(destination, \"the upload response did not contain a valid direct URL\", error);\n\t}\n\tif (url.protocol !== \"https:\" && url.protocol !== \"http:\") {\n\t\tthrow new LegacyDestinationError(destination, \"the upload response URL must use HTTP or HTTPS\");\n\t}\n\treturn url.href;\n}\n\nfunction objectValue(value: unknown): Readonly<Record<string, unknown>> {","sourceCodeStart":72,"sourceCodeEnd":108,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/blob-broker/uploaders-legacy.ts#L72-L108","documentation":"This DestinationUnavailableError is thrown specifically for the sendspace destination when the configured endpoint hostname equals `api.sendspace.com` (SENDSPACE_DEFAULT_HOST). That host was the public discovery endpoint of a deprecated API, so the library refuses to use it and requires the user to supply a genuinely different replacement endpoint.","triggerScenarios":"Configuring the sendspace destination with endpoint 'https://api.sendspace.com/...' (or any URL whose hostname, lowercased, is exactly api.sendspace.com) and invoking an upload; sendSpaceEndpoint() checks the host after configuredEndpoint() passes.","commonSituations":"Users paste the documented-but-deprecated sendspace API URL from old docs; copying the default host into the custom endpoint field without realizing it is explicitly disallowed.","solutions":["Change the sendspace endpoint to a non-default hostname (a working replacement server you control or trust)","Use any path on a different host — only the exact hostname api.sendspace.com is rejected, subdomains technically pass but will not work against the dead API","Drop the sendspace destination and use one of the still-supported destinations","Verify the hostname in the configured URL is not api.sendspace.com"],"exampleFix":"// before\nendpoint: https://api.sendspace.com/rest/1.0\n// after\nendpoint: https://sendspace-proxy.example.com/rest/1.0","handlingStrategy":"validation","validationCode":"const host = new URL(config.endpoint).hostname.toLowerCase();\nif (host === \"api.sendspace.com\") {\n  throw new Error(\"sendspace endpoint must not be the deprecated api.sendspace.com\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  await uploader.upload(request);\n} catch (err) {\n  if (err instanceof Error && err.message.includes(\"deprecated public discovery endpoint\")) {\n    // supply a non-default sendspace replacement endpoint\n  } else throw err;\n}","preventionTips":["Never set the sendspace endpoint to its default api.sendspace.com host","Use a proxy/replacement server on a distinct hostname","Validate sendspace config at load time against the known-bad host","Prefer actively maintained destinations over deprecated ones"],"tags":["configuration","deprecated-service","sendspace","endpoint"],"backgroundTag":"deprecated-endpoint-blocked","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}