Skip to content
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

simplify error and cause #2347

Closed
wants to merge 1 commit into from
Closed

simplify error and cause #2347

wants to merge 1 commit into from

Conversation

fedyk
Copy link

@fedyk fedyk commented Oct 15, 2023

This relates to #2327. Due to rebase of changes from master to next, the changes looks weird. I decided to create a new clean MR.

Rationale

Since Node v16.9.0, Error supports cause property.

Changes

Replace Object.assign with new Error(.., { cause }).

Status

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a loose recall that v16.8 is what lambda deploys, so changing this would be detrimental.

@codecov-commenter
Copy link

codecov-commenter commented Oct 15, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (b9d8368) 85.49% compared to head (e6b8379) 85.48%.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #2347      +/-   ##
==========================================
- Coverage   85.49%   85.48%   -0.02%     
==========================================
  Files          76       76              
  Lines        6867     6867              
==========================================
- Hits         5871     5870       -1     
- Misses        996      997       +1     
Files Coverage Δ
lib/fetch/body.js 97.67% <ø> (ø)
lib/fetch/index.js 85.05% <ø> (-0.18%) ⬇️
lib/fetch/response.js 95.83% <100.00%> (ø)

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

@fedyk
Copy link
Author

fedyk commented Oct 16, 2023

@mcollina thanks for your comment.

I believe you are referring to AWS Lambda. According to the docs, they support Node.js v16.x. Brief grep in the base nodejs image, shows that the current version is 16.20.2 (they probably keep the most recent version live).

@ronag
Copy link
Member

ronag commented Oct 16, 2023

Can we make a test for node 16?

@ronag ronag requested a review from mcollina October 16, 2023 08:01
@mcollina
Copy link
Member

There is already one for node v16.8 in CI

@fedyk
Copy link
Author

fedyk commented Oct 20, 2023

If support of v16.8 is important, then those changes are breaking due to cause only available in v16.9. I believe this MR can be closed for now.

@fedyk fedyk closed this Oct 20, 2023
@fedyk fedyk deleted the next branch October 20, 2023 16:40
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.

5 participants