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

chore: report error url on fetchUrlStream exception #261

Merged
merged 5 commits into from
Apr 29, 2023

Conversation

tisonkun
Copy link
Contributor

@tisonkun tisonkun commented Apr 28, 2023

FOR ISSUE LOCATING...

@aduh95
Copy link
Contributor

aduh95 commented Apr 29, 2023

Hello, can you fix the conflict please?

@tisonkun
Copy link
Contributor Author

@aduh95 Updated. It seems the other place has been fixed by another PR.

sources/httpUtils.ts Outdated Show resolved Hide resolved
tisonkun and others added 2 commits April 29, 2023 21:37
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
@tisonkun
Copy link
Contributor Author

I pushed a new commit to try fix typecheck.

sources/httpUtils.ts Outdated Show resolved Hide resolved
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
if (!(statusCode >= 200 && statusCode < 300))
return reject(new Error(`Server answered with HTTP ${statusCode}`));
const statusCode = response.statusCode;
if (statusCode != null && statusCode >= 200 && statusCode < 300)
Copy link

Choose a reason for hiding this comment

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

@aduh95 just curious why eqeq is allowed? usually js/ts projects force eqeqeq instead of eqeq to avoid implicit conversions.

Copy link
Contributor

Choose a reason for hiding this comment

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

IIRC it’s allowed only for null, because it’s the only value for which it’s useful instead of being confusing.

@aduh95 aduh95 merged commit 25fa623 into nodejs:main Apr 29, 2023
@tisonkun tisonkun deleted the patch-1 branch April 29, 2023 17:04
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