fix: capture async stack only for rejections with native error object…#5
fix: capture async stack only for rejections with native error object…#5MitchLewis930 wants to merge 1 commit intopr_025_beforefrom
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||||||
User description
PR_025
PR Type
Bug fix
Description
Capture async stack traces only for native Error objects
Refactor stack trace capture logic with improved null safety
Simplify error handling with ternary operators
Update test to use async/await pattern with proper server setup
Diagram Walkthrough
flowchart LR A["Error caught in request"] --> B{"Is native Error?"} B -->|Yes| C["Capture stack trace"] C --> D["Append async stack"] B -->|No| E["Skip stack processing"] D --> F["Throw error"] E --> FFile Walkthrough
Axios.js
Add Error type check for stack trace capturelib/core/Axios.js
instanceofErrorerr.stackanddummy.stackexistbefore processing
http.js
Refactor HTTP error stack trace test to async/awaittest/unit/adapters/http.js
startHTTPServerhelperreturnstatement