Gracefully handle a missing crypt key in the Query Tool connection endpoints. (#10065)
After a backend/pod restart the in-memory crypt key is gone, so manager.connection() raises CryptKeyMissing. The new-connection endpoints (_check_server_connection_status and get_new_connection_*) swallowed it in a broad "except Exception", logged a full ERROR traceback, and returned a generic error the client cannot recognise. The standard recovery (a 503 CRYPTKEY_MISSING response that the client uses to transparently re-establish the key and retry) therefore never fired, leaving a spurious "Crypt key is missing" message in the Query Tool and noisy tracebacks in the log. Re-raise CryptKeyMissing (along with ConnectionLost / SSHTunnelConnectionLost) before the generic handler, matching the pattern already used by the query execution path, so these endpoints emit the standard CRYPTKEY_MISSING response and the client recovers gracefully. Closes #10027
D
Dave Page committed
f6961bce499da16bf434a4b3873c0244d3fad6bf
Parent: 922f06c
Committed by GitHub <noreply@github.com>
on 6/12/2026, 4:39:03 PM