File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -299,7 +299,10 @@ pub async fn load_next_js_json_file<T: DeserializeOwned>(
299299
300300 match content. parse_json_ref ( ) {
301301 FileJsonContent :: Unparsable ( e) => Err ( anyhow ! ( "File is not valid JSON: {}" , e) ) ,
302- FileJsonContent :: NotFound => Err ( anyhow ! ( "File not found" ) ) ,
302+ FileJsonContent :: NotFound => Err ( anyhow ! (
303+ "File not found: {:?}" ,
304+ file_path. value_to_string( ) . await ?
305+ ) ) ,
303306 FileJsonContent :: Content ( value) => Ok ( serde_json:: from_value ( value) ?) ,
304307 }
305308}
@@ -316,7 +319,10 @@ pub async fn load_next_js_jsonc_file<T: DeserializeOwned>(
316319
317320 match content. parse_json_with_comments_ref ( ) {
318321 FileJsonContent :: Unparsable ( e) => Err ( anyhow ! ( "File is not valid JSON: {}" , e) ) ,
319- FileJsonContent :: NotFound => Err ( anyhow ! ( "File not found" ) ) ,
322+ FileJsonContent :: NotFound => Err ( anyhow ! (
323+ "File not found: {:?}" ,
324+ file_path. value_to_string( ) . await ?
325+ ) ) ,
320326 FileJsonContent :: Content ( value) => Ok ( serde_json:: from_value ( value) ?) ,
321327 }
322328}
You can’t perform that action at this time.
0 commit comments