MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / errorResult

Function errorResult

sdk/src/tools/read-url.ts:15–20  ·  view source on GitHub ↗
(
  url: string | undefined,
  errorMessage: string,
)

Source from the content-addressed store, hash-verified

13) => Promise<Response>
14
15function errorResult(
16 url: string | undefined,
17 errorMessage: string,
18): ReadUrlOutput {
19 return [{ type: 'json', value: { ...(url ? { url } : {}), errorMessage } }]
20}
21
22function isAllowedUrl(url: URL): boolean {
23 return url.protocol === 'http:' || url.protocol === 'https:'

Callers 1

readUrlFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected