File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ use std::{
33
33
collections:: { BTreeMap , HashMap } ,
34
34
sync:: Arc ,
35
35
} ;
36
- use tracing:: { debug, instrument, trace} ;
36
+ use tracing:: { debug, error , instrument, trace} ;
37
37
38
38
static DOC_RUST_LANG_ORG_REDIRECTS : Lazy < HashMap < & str , & str > > = Lazy :: new ( || {
39
39
HashMap :: from ( [
@@ -540,6 +540,7 @@ pub(crate) async fn rustdoc_html_server_handler(
540
540
let params = params. clone ( ) ;
541
541
let version = version. clone ( ) ;
542
542
let storage = storage. clone ( ) ;
543
+ let storage_path = storage_path. clone ( ) ;
543
544
move || {
544
545
storage. rustdoc_file_exists (
545
546
& params. name ,
@@ -571,6 +572,17 @@ pub(crate) async fn rustdoc_html_server_handler(
571
572
) ?
572
573
. into_response ( ) )
573
574
} else {
575
+ if storage_path == format ! ( "{}/index.html" , krate. target_name) {
576
+ error ! (
577
+ krate = params. name,
578
+ version,
579
+ original_path = original_path. as_ref( ) ,
580
+ storage_path,
581
+ "Couldn't find crate documentation root on storage.
582
+ Something is wrong with the build."
583
+ )
584
+ }
585
+
574
586
Err ( AxumNope :: ResourceNotFound )
575
587
} ;
576
588
}
You can’t perform that action at this time.
0 commit comments