From 683f87ddb1006d2af3b3f12ca763c4437219abfe Mon Sep 17 00:00:00 2001 From: Adil Hafeez Date: Wed, 10 Dec 2025 10:49:58 -0800 Subject: [PATCH] pass through client error as it is to developer --- crates/brightstaff/src/handlers/agent_chat_completions.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/brightstaff/src/handlers/agent_chat_completions.rs b/crates/brightstaff/src/handlers/agent_chat_completions.rs index e870e514..3a90fc48 100644 --- a/crates/brightstaff/src/handlers/agent_chat_completions.rs +++ b/crates/brightstaff/src/handlers/agent_chat_completions.rs @@ -59,8 +59,8 @@ pub async fn agent_chat( let json_string = error_json.to_string(); let mut response = Response::new(ResponseHandler::create_full_body(json_string)); - *response.status_mut() = - hyper::StatusCode::from_u16(*status).unwrap_or(hyper::StatusCode::BAD_REQUEST); + *response.status_mut() = hyper::StatusCode::from_u16(*status) + .unwrap_or(hyper::StatusCode::INTERNAL_SERVER_ERROR); response.headers_mut().insert( hyper::header::CONTENT_TYPE, "application/json".parse().unwrap(),