Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/ac_scraper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,8 @@ pub async fn get_sample_cases(
.await?
.error_for_status()?
.text()
.await?;
.await
.with_context(|| "Failed to get sample cases. Please check you logged in and try again.")?;
let doc = Html::parse_document(&body);

let pre_selector = Selector::parse("pre").unwrap();
Expand Down
6 changes: 5 additions & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,11 @@ pub async fn get_problem_info_from_path(
};
let problem_str_info = get_problem_str_info(&problem_info);
let (problem_info, problem_str_info) =
add_task_name_to_problem_info(acn, problem_info, problem_str_info).await?;
add_task_name_to_problem_info(acn, problem_info, problem_str_info)
.await
.with_context(|| {
"Failed to get task name. Please check you logged in and the contest exists"
})?;
return Ok((problem_info, problem_str_info));
}

Expand Down