MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / recordDurableObjectFailure

Function recordDurableObjectFailure

apps/cloud/src/mcp/agent-handler.ts:107–128  ·  view source on GitHub ↗
(
  failure: DurableObjectFailure,
  operation: string,
)

Source from the content-addressed store, hash-verified

105 * unrecognized failure never reaches here and keeps escaping as before.
106 */
107const recordDurableObjectFailure = (
108 failure: DurableObjectFailure,
109 operation: string,
110): Effect.Effect<void> =>
111 Effect.sync(() => {
112 console.warn(
113 JSON.stringify({
114 event: "mcp_durable_object_platform_failure",
115 operation,
116 resetKind: failure.kind,
117 disposition: failure.disposition,
118 }),
119 );
120 }).pipe(
121 Effect.withSpan("mcp.do.platform_failure", {
122 attributes: {
123 "mcp.do.reset_kind": failure.kind,
124 "mcp.do.reset_disposition": failure.disposition,
125 "mcp.do.reset_operation": operation,
126 },
127 }),
128 );
129
130const authenticate = (request: Request) =>
131 Effect.gen(function* () {

Callers 1

makeCloudMcpAgentHandlerFunction · 0.85

Calls 2

warnMethod · 0.80
syncMethod · 0.65

Tested by

no test coverage detected