Skip to content

Commit 6166748

Browse files
authored
Password Error Handling Fix (#178)
1 parent 7b86e07 commit 6166748

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

dbos/_db_wizard.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,11 @@ def db_connect(config: "ConfigFile", config_file_path: str) -> "ConfigFile":
2323
return config
2424

2525
# 2. If the error is due to password authentication or the configuration is non-default, surface the error and exit.
26-
if "password authentication failed" in str(db_connection_error) or "28P01" in str(
27-
db_connection_error
26+
error_str = str(db_connection_error)
27+
if (
28+
"password authentication failed" in error_str
29+
or "28P01" in error_str
30+
or "no password supplied" in error_str
2831
):
2932
raise DBOSInitializationError(
3033
f"Could not connect to Postgres: password authentication failed: {db_connection_error}"

0 commit comments

Comments
 (0)