mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-12 00:39:03 +08:00
feat(admin/check-fire-engine): better logging
This commit is contained in:
parent
e8f27bef08
commit
42236ef0f0
@ -16,7 +16,7 @@ export async function checkFireEngine(req: Request, res: Response) {
|
|||||||
const timeout = setTimeout(() => controller.abort(), 30000);
|
const timeout = setTimeout(() => controller.abort(), 30000);
|
||||||
|
|
||||||
const urls = ["https://roastmywebsite.ai", "https://example.com"];
|
const urls = ["https://roastmywebsite.ai", "https://example.com"];
|
||||||
let lastError: string | null = null;
|
let lastError: any = null;
|
||||||
|
|
||||||
for (const url of urls) {
|
for (const url of urls) {
|
||||||
try {
|
try {
|
||||||
@ -57,7 +57,11 @@ export async function checkFireEngine(req: Request, res: Response) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If we get here, all retries failed
|
// If we get here, all retries failed
|
||||||
logger.error(lastError);
|
logger.error("An error occurred while checking fire-engine", {
|
||||||
|
module: "admin",
|
||||||
|
method: "checkFireEngine",
|
||||||
|
error: lastError,
|
||||||
|
});
|
||||||
Sentry.captureException(lastError);
|
Sentry.captureException(lastError);
|
||||||
return res.status(500).json({
|
return res.status(500).json({
|
||||||
success: false,
|
success: false,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user