pass through client error as it is to developer

This commit is contained in:
Adil Hafeez 2025-12-10 10:49:58 -08:00
parent 68727cd739
commit 683f87ddb1
No known key found for this signature in database
GPG key ID: 9B18EF7691369645

View file

@ -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(),