Skip to content

Conversation

@deve-sh
Copy link
Collaborator

@deve-sh deve-sh commented Dec 3, 2025

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 error event, but this change ensures the responses attached to these errors is propagated to the consumer.

Builds on: postmanlabs/tunnel-agent#6

@deve-sh
Copy link
Collaborator Author

deve-sh commented Dec 3, 2025

TODO: Figure out how we can test this 🤔

Copy link
Member

@appurva21 appurva21 left a 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
Copy link

codecov bot commented Dec 4, 2025

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 41.88%. Comparing base (40ef304) to head (331e8ab).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
lib/requester/requester.js 0.00% 5 Missing ⚠️

❌ 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              
Flag Coverage Δ
unit 41.88% <0.00%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@deve-sh
Copy link
Collaborator Author

deve-sh commented Dec 5, 2025

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.

@appurva21
Copy link
Member

Pending:

  1. Update postman-request
  2. Changelog

@deve-sh
Copy link
Collaborator Author

deve-sh commented Dec 10, 2025

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.

@deve-sh deve-sh requested a review from appurva21 December 11, 2025 14:59
@appurva21 appurva21 merged commit 7b9030f into develop Dec 11, 2025
11 of 18 checks passed
@appurva21 appurva21 deleted the fix/handle-requester-errors-with-responses branch December 11, 2025 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants