-
Notifications
You must be signed in to change notification settings - Fork 122
fix: Handle requester errors with attached responses #1537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Handle requester errors with attached responses #1537
Conversation
|
TODO: Figure out how we can test this 🤔 |
appurva21
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Can we add a test case for this?
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## develop #1537 +/- ##
===========================================
- Coverage 41.92% 41.88% -0.05%
===========================================
Files 49 49
Lines 3790 3794 +4
Branches 1085 1087 +2
===========================================
Hits 1589 1589
- Misses 2078 2082 +4
Partials 123 123
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Added tests for this change, but it relies on merging and bumping up: postmanlabs/postman-request#108 and postmanlabs/tunnel-agent#6 Tests passing as expected locally, old and new. |
|
Pending:
|
|
Changelog has been added. Necessity for the postman-request change:
Could I setup a workaround for this that takes care of these specific fields? Yes, but I don't think it's a good idea. The handling would need to be very specific to this particular change, and it would add complexity to this block that works perfectly fine for all existing use-cases. |
For errors originating internally from libraries such as the tunnel-agent, which can now have responses attached to them, the behaviour of runtime needs to treat these errors as responses that the consumer needs visibility to.
So far, these errors were merely thrown along with the
errorevent, but this change ensures the responses attached to these errors is propagated to the consumer.Builds on: postmanlabs/tunnel-agent#6