We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 03f5b5c commit 5b9d6adCopy full SHA for 5b9d6ad
usaco_util.ts
@@ -6,7 +6,6 @@ const problems = require('./problems.json') as { [key: string]: ProblemData };
6
let report = 'added problems:\n```\n';
7
8
async function addProblem(id: number) {
9
- console.log('Adding problem ', id);
10
try {
11
const url = `https://usaco.org/index.php?page=viewproblem2&cpid=${id}`;
12
const response = await (await fetch(url)).text();
@@ -59,7 +58,7 @@ async function addProblem(id: number) {
59
58
);
60
return true;
61
} catch (error) {
62
- console.log(error);
+ if (!(error instanceof TypeError)) console.log(error);
63
return false;
64
}
65
0 commit comments