apx-toolkit
Version:
Automatically discover APIs and generate complete integration packages: code in 12 languages, TypeScript types, test suites, SDK packages, API documentation, mock servers, performance reports, and contract tests. Saves 2-4 weeks of work in seconds.
81 lines (56 loc) โข 1.92 kB
Markdown
# โ
Bug Fixes Applied
**Date:** November 29, 2025
**Status:** โ
Fixed, built, committed, and pushed
## ๐ Issue Found
**Problem:** One test failed when handling invalid URLs. The actor would crash instead of gracefully handling errors.
**Root Cause:**
- No `failedRequestHandler` configured for crawlers
- Navigation errors weren't handled gracefully
- Single URL failure would crash entire actor
## โ
Fixes Applied
### 1. Added `failedRequestHandler` to PlaywrightCrawler
- Gracefully handles failed discovery requests
- Logs warnings instead of crashing
- Allows other URLs to continue processing
### 2. Added `failedRequestHandler` to HttpCrawler
- Handles failed API requests gracefully
- Continues processing other APIs
- Prevents single failure from stopping all processing
### 3. Enhanced Error Messages
- Detects specific error types:
- Domain not found (ENOTFOUND)
- Connection refused
- SSL errors
- Timeout errors
- Provides helpful suggestions for each error type
### 4. Improved Error Handling
- Added try-catch for crawler.run()
- Distinguishes critical vs. non-critical errors
- Allows partial success results
## ๐ Impact
### Before:
- โ Invalid URL โ Actor crashes
- โ Network error โ Actor crashes
- โ No partial results
### After:
- โ
Invalid URL โ Warning logged, continues
- โ
Network error โ Error logged, continues
- โ
Partial success โ Successful URLs processed
## ๐งช Testing
**Next Steps:**
1. โ
Code fixed and built
2. โ
Committed to GitHub
3. โ
Pushed to GitHub
4. โณ New Apify build triggered
5. โณ Re-run stress tests to verify fixes
## ๐ Files Changed
- `src/main.ts` - Added failedRequestHandler to both crawlers
- `src/handlers/discovery-handler.ts` - Enhanced error messages
- `BUG-FIXES.md` - Detailed documentation
**Status:** โ
Ready for testing after new build completes