File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -561,7 +561,8 @@ pub async fn get_sample_cases(
561561 . await ?
562562 . error_for_status ( ) ?
563563 . text ( )
564- . await ?;
564+ . await
565+ . with_context ( || "Failed to get sample cases. Please check you logged in and try again." ) ?;
565566 let doc = Html :: parse_document ( & body) ;
566567
567568 let pre_selector = Selector :: parse ( "pre" ) . unwrap ( ) ;
Original file line number Diff line number Diff line change @@ -313,7 +313,11 @@ pub async fn get_problem_info_from_path(
313313 } ;
314314 let problem_str_info = get_problem_str_info ( & problem_info) ;
315315 let ( problem_info, problem_str_info) =
316- add_task_name_to_problem_info ( acn, problem_info, problem_str_info) . await ?;
316+ add_task_name_to_problem_info ( acn, problem_info, problem_str_info)
317+ . await
318+ . with_context ( || {
319+ "Failed to get task name. Please check you logged in and the contest exists"
320+ } ) ?;
317321 return Ok ( ( problem_info, problem_str_info) ) ;
318322 }
319323
You can’t perform that action at this time.
0 commit comments