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

Function counterErrorCode

apps/cloud/src/engine/execution-rate-limit.ts:110–116  ·  view source on GitHub ↗
(reason: string)

Source from the content-addressed store, hash-verified

108// (A shared `classifyDurableObjectError` would be the right home for this once
109// one exists.)
110const counterErrorCode = (reason: string): RateLimitCounterErrorCode => {
111 if (/caused object to be reset/i.test(reason)) return "storage_reset";
112 if (/overloaded/i.test(reason)) return "overloaded";
113 if (/exceeded (its )?memory|out of memory/i.test(reason)) return "exceeded_memory";
114 if (/network connection lost|connection.*(lost|reset)/i.test(reason)) return "network";
115 return "unknown";
116};
117
118/**
119 * The fail-open landing: record the outcome on the check span, warn, and allow

Callers 1

counterIncrementFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected