can1357/oh-my-pi · error · Error
Missing required destination option: endpoint
Error message
Missing required destination option: endpoint
What it means
requiredEndpoint() throws this when the destination runtime config has no 'endpoint' option (or it is empty). Self-hosted image-host destinations like Chevereto require an explicit endpoint URL because there is no default host.
Source
Thrown at packages/coding-agent/src/blob-broker/uploaders-image-hosts.ts:303
nojsoncallback: "1",
photo_id: photoId,
};
const getSizesOAuth = await oauthParameters("GET", FLICKR_REST_URL, getSizesFields, credentials);
const getSizesUrl = new URL(FLICKR_REST_URL);
const getSizesParameters: Record<string, string> = { ...getSizesFields, ...getSizesOAuth };
for (const key in getSizesParameters) {
getSizesUrl.searchParams.append(key, getSizesParameters[key]);
}
const sizesResponse = await fetchFor(config)(getSizesUrl, { method: "GET" });
const sizes = await jsonResponse(sizesResponse, "flickr");
return publication("flickr", request, largestFlickrSource(sizes), { remoteId: photoId });
},
};
}
function requiredEndpoint(config: DestinationRuntimeConfig): string {
const endpoint = optionString(config, "endpoint");
if (!endpoint) throw new Error("Missing required destination option: endpoint");
let url: URL;
try {
url = new URL(endpoint);
} catch {
throw new Error("Destination option endpoint must be an absolute URL");
}
if (url.protocol !== "https:" && url.protocol !== "http:") {
throw new Error("Destination option endpoint must use HTTP or HTTPS");
}
return url.href;
}
function createCheveretoUploader(config: DestinationRuntimeConfig): BlobUploader {
const endpoint = requiredEndpoint(config);
const apiKey = requireCredential(config, "apiKey");
return {
destination: "chevereto",View on GitHub (pinned to 9690622007)
Solutions
- Add the endpoint option to the destination config, e.g. { "endpoint": "https://your-chevereto-host.example" }
- Check the option key spelling — it must be exactly 'endpoint'
- Verify the config file/source actually loads the options into DestinationRuntimeConfig
- Consult the destination's documented required options in the blob-broker docs
Example fix
// before
destinations: [{ "kind": "chevereto", "options": { "apiKey": "xxx" } }]
// after
destinations: [{ "kind": "chevereto", "options": { "apiKey": "xxx", "endpoint": "https://chev.example.com" } }] Defensive patterns
Strategy: validation
Validate before calling
function assertEndpointOption(config: DestinationRuntimeConfig): string {
const ep = config.options?.endpoint;
if (typeof ep !== "string" || !ep.trim()) throw new Error("destination requires an 'endpoint' option");
return ep;
} Type guard
function hasEndpoint(config: DestinationRuntimeConfig): config is DestinationRuntimeConfig & { options: { endpoint: string } } {
return typeof config.options?.endpoint === "string" && config.options.endpoint.trim().length > 0;
} Try / catch
try {
const uploader = endpoint(config);
} catch (err) {
if (err instanceof Error && err.message.includes("Missing required destination option: endpoint")) {
// surface a config-fix hint to the user
}
throw err;
} Prevention
- Validate destination configs (required options present) at load time
- Document required options per destination kind in your config schema
- Use JSON/YAML schema validation on the settings file
- Beware of option-key typos like 'url' vs 'endpoint'
When it happens
Trigger: Creating a chevereto (or other generic-endpoint) uploader from a DestinationRuntimeConfig whose options omit the endpoint key, or the option value is an empty string.
Common situations: Destination configured in settings with only credentials but no endpoint, typo in the option name (e.g. 'url' instead of 'endpoint'), or config loading dropping unknown option keys.
Related errors
- a user-supplied replacement endpoint is required
- OMP_AUTH_BROKER_ACCOUNT_POOL_FILE contains an empty provider
- OMP_AUTH_BROKER_ACCOUNT_POOL_FILE contains a provider id wit
- ${name} path does not exist: ${trimmed}
- Anthropic thinking budget requires max_tokens greater than $
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/e9491d8e49c7088b.
Report an issue: GitHub.