From b2ff9fdb7e52532b10d816780b7fa91954c08c9e Mon Sep 17 00:00:00 2001 From: Jesus Fileto Date: Wed, 4 Dec 2024 02:39:13 -0500 Subject: [PATCH] Additional Debugging Info on 403 Error --- libs/chonky/src/embedding/multi_modal_embedding.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libs/chonky/src/embedding/multi_modal_embedding.rs b/libs/chonky/src/embedding/multi_modal_embedding.rs index 05a63b865dd..ebaa143f725 100644 --- a/libs/chonky/src/embedding/multi_modal_embedding.rs +++ b/libs/chonky/src/embedding/multi_modal_embedding.rs @@ -210,8 +210,13 @@ pub async fn make_multimodal_api_request( if !response.status().is_success() { return Err( Report::new(ChonkyError::VertexAPI).attach_printable(format!( - "Received the error code {} in the response status", - response.status() + "Received the error code {} in the response status with error text {:?}", + response.status(), + response + .error_for_status() + .change_context(ChonkyError::VertexAPI)? + .text() + .await, )), ); }