{"record":{"id":"e9491d8e49c7088b","repo":"can1357/oh-my-pi","slug":"missing-required-destination-option-endpoint","errorCode":null,"errorMessage":"Missing required destination option: endpoint","messagePattern":"Missing required destination option: endpoint","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/blob-broker/uploaders-image-hosts.ts","lineNumber":303,"sourceCode":"\t\t\t\tnojsoncallback: \"1\",\n\t\t\t\tphoto_id: photoId,\n\t\t\t};\n\t\t\tconst getSizesOAuth = await oauthParameters(\"GET\", FLICKR_REST_URL, getSizesFields, credentials);\n\t\t\tconst getSizesUrl = new URL(FLICKR_REST_URL);\n\t\t\tconst getSizesParameters: Record<string, string> = { ...getSizesFields, ...getSizesOAuth };\n\t\t\tfor (const key in getSizesParameters) {\n\t\t\t\tgetSizesUrl.searchParams.append(key, getSizesParameters[key]);\n\t\t\t}\n\t\t\tconst sizesResponse = await fetchFor(config)(getSizesUrl, { method: \"GET\" });\n\t\t\tconst sizes = await jsonResponse(sizesResponse, \"flickr\");\n\t\t\treturn publication(\"flickr\", request, largestFlickrSource(sizes), { remoteId: photoId });\n\t\t},\n\t};\n}\n\nfunction requiredEndpoint(config: DestinationRuntimeConfig): string {\n\tconst endpoint = optionString(config, \"endpoint\");\n\tif (!endpoint) throw new Error(\"Missing required destination option: endpoint\");\n\tlet url: URL;\n\ttry {\n\t\turl = new URL(endpoint);\n\t} catch {\n\t\tthrow new Error(\"Destination option endpoint must be an absolute URL\");\n\t}\n\tif (url.protocol !== \"https:\" && url.protocol !== \"http:\") {\n\t\tthrow new Error(\"Destination option endpoint must use HTTP or HTTPS\");\n\t}\n\treturn url.href;\n}\n\nfunction createCheveretoUploader(config: DestinationRuntimeConfig): BlobUploader {\n\tconst endpoint = requiredEndpoint(config);\n\tconst apiKey = requireCredential(config, \"apiKey\");\n\n\treturn {\n\t\tdestination: \"chevereto\",","sourceCodeStart":285,"sourceCodeEnd":321,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/blob-broker/uploaders-image-hosts.ts#L285-L321","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\ndestinations: [{ \"kind\": \"chevereto\", \"options\": { \"apiKey\": \"xxx\" } }]\n// after\ndestinations: [{ \"kind\": \"chevereto\", \"options\": { \"apiKey\": \"xxx\", \"endpoint\": \"https://chev.example.com\" } }]","handlingStrategy":"validation","validationCode":"function assertEndpointOption(config: DestinationRuntimeConfig): string {\n\tconst ep = config.options?.endpoint;\n\tif (typeof ep !== \"string\" || !ep.trim()) throw new Error(\"destination requires an 'endpoint' option\");\n\treturn ep;\n}","typeGuard":"function hasEndpoint(config: DestinationRuntimeConfig): config is DestinationRuntimeConfig & { options: { endpoint: string } } {\n\treturn typeof config.options?.endpoint === \"string\" && config.options.endpoint.trim().length > 0;\n}","tryCatchPattern":"try {\n\tconst uploader = endpoint(config);\n} catch (err) {\n\tif (err instanceof Error && err.message.includes(\"Missing required destination option: endpoint\")) {\n\t\t// surface a config-fix hint to the user\n\t}\n\tthrow err;\n}","preventionTips":["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'"],"tags":["configuration","endpoint","validation"],"backgroundTag":"missing-config-option","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}