MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / serviceUnavailable

Function serviceUnavailable

server/src/training-agent/framework-server.ts:184–196  ·  view source on GitHub ↗
(err: unknown, callerContext: unknown)

Source from the content-addressed store, hash-verified

182}
183
184function serviceUnavailable(err: unknown, callerContext: unknown): AdaptedResponse {
185 const errorObj: Record<string, unknown> = {
186 code: 'SERVICE_UNAVAILABLE',
187 message: err instanceof Error ? err.message : 'Unknown error',
188 recovery: 'transient',
189 };
190 const body = wrapEnvelope({ adcp_error: errorObj }, { context: callerContext });
191 return {
192 isError: true,
193 content: [{ type: 'text', text: JSON.stringify(body) }],
194 structuredContent: body,
195 };
196}
197
198function versionUnsupported(requested: unknown, callerContext: unknown): AdaptedResponse {
199 const errorObj: Record<string, unknown> = {

Callers 2

adaptFunction · 0.85
customToolForFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected