Skip to content

Commit 2111874

Browse files
committed
increase timeout, better log
1 parent 889d7f9 commit 2111874

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

core/indexing/docs/crawlers/DefaultCrawler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export class DefaultCrawler {
2626
});
2727
if (!resp.ok) {
2828
const text = await resp.text();
29-
throw new Error(`Failed to crawl site: ${text}`);
29+
throw new Error(`Failed to crawl site (${resp.status}): ${text}`);
3030
}
3131
const json = (await resp.json()) as PageData[];
3232
return json;

core/indexing/docs/crawlers/DocsCrawler.test.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,15 @@ describe("DocsCrawler", () => {
152152
);
153153

154154
commonDocsSites.forEach((url) => {
155-
test(`Default crawler common site: ${url}`, async () => {
156-
const { pages, crawler } = await runCrawl(url);
157-
expect(pages.length).toBeGreaterThanOrEqual(1);
158-
expect(crawler).toEqual("default");
159-
});
155+
test(
156+
`Default crawler common site: ${url}`,
157+
async () => {
158+
const { pages, crawler } = await runCrawl(url);
159+
expect(pages.length).toBeGreaterThanOrEqual(1);
160+
expect(crawler).toEqual("default");
161+
},
162+
TIMEOUT_MS,
163+
);
160164
});
161165
});
162166

0 commit comments

Comments
 (0)