Skip to content

Commit

Permalink
Report entire error chain for WebSocket errors
Browse files Browse the repository at this point in the history
  • Loading branch information
shepmaster committed Dec 6, 2023
1 parent 59c1928 commit 2cece27
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ui/src/server_axum/websocket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,10 @@ fn create_server_meta() -> Meta {
}

fn error_to_response(error: Error) -> MessageResponse {
let error = error.to_string();
let error = snafu::CleanedErrorText::new(&error)
.map(|(_, t, _)| t)
.reduce(|e, t| e + ": " + &t)
.unwrap_or_default();
let payload = WSError { error };
// TODO: thread through the Meta from the originating request
let meta = create_server_meta();
Expand Down

0 comments on commit 2cece27

Please sign in to comment.