Skip to content

Commit

Permalink
fix: improve streamin error to include error_type
Browse files Browse the repository at this point in the history
  • Loading branch information
drbh committed Oct 25, 2024
1 parent 825f39d commit 2b1a360
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions router/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2530,6 +2530,7 @@ pub struct APIError {
#[derive(serde::Serialize)]
pub struct ErrorEvent {
error: APIError,
error_type: String,
}

impl ErrorEvent {
Expand All @@ -2539,6 +2540,7 @@ impl ErrorEvent {
message: err.to_string(),
http_status_code,
},
error_type: err.error_type().to_string(),
}
}
}
Expand Down

0 comments on commit 2b1a360

Please sign in to comment.