We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c135e93 commit f48d079Copy full SHA for f48d079
src/lib/server/websearch/scrape/scrape.ts
@@ -35,6 +35,7 @@ export const scrape = (maxCharsPerElem: number) =>
35
export async function scrapeUrl(url: string, maxCharsPerElem: number) {
36
return withPage(url, async (page, res) => {
37
if (!res) throw Error("Failed to load page");
38
+ if (!res.ok()) throw Error(`Failed to load page: ${res.status()}`);
39
40
// Check if it's a non-html content type that we can handle directly
41
// TODO: direct mappings to markdown can be added for markdown, csv and others
0 commit comments