Skip to content

Commit 66eec26

Browse files
committed
change connection strategy and fail immediately
1 parent 818a272 commit 66eec26

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/auth.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ impl DbAuthStrategy for GlobeStrategy {
3939
}
4040

4141
return Err(format!(
42-
"Failed to authenticate database. Http Status Code: {}",
43-
status_code,
42+
"Failed to authenticate database. Http Status Code: {}, Error: {}",
43+
status_code, error_message
4444
)
4545
.into());
4646
}

src/sqlite.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,9 +365,7 @@ async fn execute_sql_and_params(
365365
Ok(response) => return Ok(response),
366366
Err(err) => {
367367
db.connection.strategy = transport::ActiveStrategy::Http;
368-
if cfg!(debug_assertions) {
369-
eprintln!("WebSocket failed, retrying with HTTP... {}", err);
370-
}
368+
return Err(err);
371369
}
372370
}
373371
}

0 commit comments

Comments
 (0)