mirror of
https://github.com/HeyPuter/puter.git
synced 2026-11-08 15:04:33 +00:00
A credential lookup that threw (a database or cache outage) was treated as no actor, so the session got `invalid_api_key` and a 1008 close. That is terminal for the SDK, which then ended an established conversation that only needed to reconnect. A failed lookup now gets `internal_error` and closes with 1011, which the SDK retries; missing, invalid and revoked credentials keep `invalid_api_key` and 1008. Nothing is cached for the failed lookup, and the cause is logged server-side only. A session whose usage records pile up behind metering now closes with 1013 instead of 1008, still with `rate_limit_exceeded`. Queued usage is still recorded and its holds released. An unexpected setup failure now sends `internal_error` before its 1011 close. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>