File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -455,14 +455,27 @@ async fn upload_file(
455
455
} ) ?;
456
456
457
457
let is_success = pdf2md_response. status ( ) . is_success ( ) ;
458
+ let status_code = pdf2md_response. status ( ) ;
458
459
459
460
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
+ ) )
462
470
} ) ?;
463
471
464
472
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
+
466
479
return Err ( BroccoliError :: Job (
467
480
"Could not send file to pdf2md" . to_string ( ) ,
468
481
) ) ;
You can’t perform that action at this time.
0 commit comments