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:
@@ -228,7 +228,7 @@ export const CnncecpCrawler = {
|
||||
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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user