can1357/oh-my-pi · error · DestinationUnavailableError
the deprecated public discovery endpoint cannot be used
Error message
the deprecated public discovery endpoint cannot be used
What it means
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.
Source
Thrown at packages/coding-agent/src/blob-broker/uploaders-legacy.ts:90
if (endpoint.protocol !== "https:" && endpoint.protocol !== "http:") {
throw new LegacyDestinationError(destination, "the configured endpoint must use HTTP or HTTPS");
}
const hostname = endpoint.hostname.toLowerCase();
const blocked = BLOCKED_CUSTOM_HOSTS[destination];
if (blocked) {
for (const domain of blocked) {
if (hostname === domain || hostname.endsWith(`.${domain}`)) {
throw new DestinationUnavailableError(destination, "the defunct public endpoint cannot be used");
}
}
}
return endpoint;
}
function sendSpaceEndpoint(config: DestinationRuntimeConfig): URL {
const endpoint = configuredEndpoint("sendspace", config);
if (endpoint.hostname.toLowerCase() === SENDSPACE_DEFAULT_HOST) {
throw new DestinationUnavailableError("sendspace", "the deprecated public discovery endpoint cannot be used");
}
return endpoint;
}
function httpUrl(destination: BlobDestinationId, raw: string, base?: URL): string {
let url: URL;
try {
url = base ? new URL(raw, base) : new URL(raw);
} catch (error) {
throw new LegacyDestinationError(destination, "the upload response did not contain a valid direct URL", error);
}
if (url.protocol !== "https:" && url.protocol !== "http:") {
throw new LegacyDestinationError(destination, "the upload response URL must use HTTP or HTTPS");
}
return url.href;
}
function objectValue(value: unknown): Readonly<Record<string, unknown>> {View on GitHub (pinned to 9690622007)
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
Example fix
// before endpoint: https://api.sendspace.com/rest/1.0 // after endpoint: https://sendspace-proxy.example.com/rest/1.0
Defensive patterns
Strategy: validation
Validate before calling
const host = new URL(config.endpoint).hostname.toLowerCase();
if (host === "api.sendspace.com") {
throw new Error("sendspace endpoint must not be the deprecated api.sendspace.com");
} Try / catch
try {
await uploader.upload(request);
} catch (err) {
if (err instanceof Error && err.message.includes("deprecated public discovery endpoint")) {
// supply a non-default sendspace replacement endpoint
} else throw err;
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- the defunct public endpoint cannot be used
- Missing required destination option: endpoint
- a user-supplied replacement endpoint is required
- No model configured
- Azure OpenAI base URL is required. Set AZURE_OPENAI_BASE_URL
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/d9b70b170390af99.
Report an issue: GitHub.