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

Function recordDurableObjectFailure

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

Source from the content-addressed store, hash-verified

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

Callers 1

makeCloudMcpAgentHandlerFunction · 0.85

Calls 2

warnMethod · 0.80
syncMethod · 0.65

Tested by

no test coverage detected