mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-07-31 23:51:59 +08:00
better logs
This commit is contained in:
parent
ad7e3f62d1
commit
b45e3bda13
@ -401,7 +401,9 @@ export async function generateCompletions({
|
|||||||
try {
|
try {
|
||||||
JSON.parse(text);
|
JSON.parse(text);
|
||||||
return text;
|
return text;
|
||||||
} catch (_) {}
|
} catch (e) {
|
||||||
|
logger.error("Even after repairing, failed to parse JSON", { error: e });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -545,7 +547,7 @@ export async function generateCompletions({
|
|||||||
throw new LLMRefusalError(error.message);
|
throw new LLMRefusalError(error.message);
|
||||||
}
|
}
|
||||||
logger.error("LLM extraction failed", {
|
logger.error("LLM extraction failed", {
|
||||||
error: lastError.message,
|
error: lastError,
|
||||||
model: currentModel.modelId,
|
model: currentModel.modelId,
|
||||||
mode,
|
mode,
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user