mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-14 00:42:54 +00:00
proxy: improve http logs (#4976)
Fix multiline logs on websocket errors and always print sql-over-http errors sent to the user.
This commit is contained in:
committed by
GitHub
parent
d39fd66773
commit
3a6b99f03c
@@ -192,7 +192,7 @@ async fn ws_handler(
|
||||
if let Err(e) =
|
||||
serve_websocket(websocket, config, &cancel_map, session_id, host).await
|
||||
{
|
||||
error!(session_id = ?session_id, "error in websocket connection: {e:?}");
|
||||
error!(session_id = ?session_id, "error in websocket connection: {e:#}");
|
||||
}
|
||||
}
|
||||
.in_current_span(),
|
||||
@@ -221,6 +221,10 @@ async fn ws_handler(
|
||||
},
|
||||
None => Value::Null,
|
||||
};
|
||||
error!(
|
||||
?code,
|
||||
"sql-over-http per-client task finished with an error: {e:#}"
|
||||
);
|
||||
(
|
||||
json!({ "message": message, "code": code }),
|
||||
HashMap::default(),
|
||||
|
||||
Reference in New Issue
Block a user