feat(api): add unified request utility with type definitions

Implement a centralized API request utility with proper TypeScript interfaces
for bid items, AI recommendations, and crawl statistics. The utility handles
base URL configuration, request/response typing, and error handling.
This commit is contained in:
dmy
2026-01-15 14:28:04 +08:00
parent 20c7c0da0c
commit 36cbb6fda1
13 changed files with 117 additions and 12 deletions

View File

@@ -229,7 +229,7 @@ export const EpsCrawler = {
const errorMessage =
error instanceof Error ? error.message : String(error);
logger.error(`Failed to crawl ${this.name}: ${errorMessage}`);
return allResults;
throw error;
} finally {
await page.close();
}