File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -455,14 +455,27 @@ async fn upload_file(
455455 } ) ?;
456456
457457 let is_success = pdf2md_response. status ( ) . is_success ( ) ;
458+ let status_code = pdf2md_response. status ( ) ;
458459
459460 let response_body: serde_json:: Value = pdf2md_response. json ( ) . await . map_err ( |err| {
460- log:: error!( "Could not get pdf2md response body {:?}" , err) ;
461- BroccoliError :: Job ( "Could not get pdf2md response body" . to_string ( ) )
461+ log:: error!(
462+ "Could not get pdf2md response body, status: {}, error: {:?}" ,
463+ status_code,
464+ err
465+ ) ;
466+ BroccoliError :: Job ( format ! (
467+ "Could not get pdf2md response body, status: {}" ,
468+ status_code
469+ ) )
462470 } ) ?;
463471
464472 if !is_success {
465- log:: error!( "pdf2md response body: {:?}" , response_body. clone( ) ) ;
473+ log:: error!(
474+ "pdf2md failed with status: {}, response body: {:?}" ,
475+ status_code,
476+ response_body
477+ ) ;
478+
466479 return Err ( BroccoliError :: Job (
467480 "Could not send file to pdf2md" . to_string ( ) ,
468481 ) ) ;
You can’t perform that action at this time.
0 commit comments