UNPKG

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
# โœ… 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