The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 06:00 UTC
| 1 | /** |
| 2 | * The reason a placeholder Durable Object aborts every call with (see |
| 3 | * `makePlaceholderScript` in `WorkerProvider.ts`). The abort resets the |
| 4 | * object, so the next call constructs it from the currently deployed code. |
| 5 | * |
| 6 | * @internal |
| 7 | */ |
| 8 | export const placeholderResetReason = "Alchemy worker is being deployed"; |
| 9 | |
| 10 | /** |
| 11 | * Whether a failed RPC call was answered by a placeholder Durable Object. It |
| 12 | * ran none of the real code, so the call is always safe to retry. |
| 13 | * |
| 14 | * @internal |
| 15 | */ |
| 16 | export const isPlaceholderReset = (cause: unknown): boolean => |
| 17 | cause instanceof Error && cause.message.includes(placeholderResetReason); |