Skip to content

Commit 64cf446

Browse files
committed
Add debugging messages
1 parent 615ef0a commit 64cf446

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

singlestoredb/management/manager.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
from .. import config
1717
from ..exceptions import ManagementError
18+
from ..exceptions import OperationalError
1819
from .utils import get_token
1920

2021

@@ -349,10 +350,10 @@ def _wait_on_endpoint(
349350
# Try to establish a connection to the endpoint using context manager
350351
with out.connect(connect_timeout=5):
351352
pass
352-
# If connection succeeds, endpoint is ready
353-
print('CONNECTED')
354-
break
355-
except Exception:
353+
except Exception as exc:
354+
if isinstance(exc, OperationalError) and exc.errno == 1045:
355+
print('CONNECTED')
356+
break
356357
print('STILL WAITING')
357358
import traceback
358359
traceback.print_exc()

0 commit comments

Comments
 (0)