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

Function recordDurableObjectFailure

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

Source from the content-addressed store, hash-verified

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

Callers 1

makeCloudMcpAgentHandlerFunction · 0.85

Calls 2

warnMethod · 0.80
syncMethod · 0.65

Tested by

no test coverage detected