mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-12 20:19:11 +08:00
fix: adjust Playwright service response to match API schema expectations
This commit is contained in:
parent
842b522b44
commit
5e267f92ff
@ -196,7 +196,7 @@ app.post('/scrape', async (req: Request, res: Response) => {
|
||||
}
|
||||
}
|
||||
|
||||
const pageError = pageStatusCode !== 200 ? getError(pageStatusCode) : false;
|
||||
const pageError = pageStatusCode !== 200 ? getError(pageStatusCode) : undefined;
|
||||
|
||||
if (!pageError) {
|
||||
console.log(`✅ Scrape successful!`);
|
||||
@ -209,7 +209,7 @@ app.post('/scrape', async (req: Request, res: Response) => {
|
||||
res.json({
|
||||
content: pageContent,
|
||||
pageStatusCode,
|
||||
pageError
|
||||
...(pageError && { pageError })
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user