mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-13 14:19:03 +08:00
fix(runWebScraper): proper error handling
This commit is contained in:
parent
2de659d810
commit
139e2c9a05
@ -96,7 +96,6 @@ export async function runWebScraper({
|
|||||||
...internalOptions,
|
...internalOptions,
|
||||||
});
|
});
|
||||||
if (!response.success) {
|
if (!response.success) {
|
||||||
error = response.error;
|
|
||||||
if (response.error instanceof Error) {
|
if (response.error instanceof Error) {
|
||||||
throw response.error;
|
throw response.error;
|
||||||
} else {
|
} else {
|
||||||
@ -124,7 +123,8 @@ export async function runWebScraper({
|
|||||||
// status code is good -- do not attempt retry
|
// status code is good -- do not attempt retry
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (_error) {
|
||||||
|
error = _error;
|
||||||
engines =
|
engines =
|
||||||
response !== undefined
|
response !== undefined
|
||||||
? response.engines
|
? response.engines
|
||||||
|
Loading…
x
Reference in New Issue
Block a user