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

Unhandled rejection when using rewrite proxy #72522

Open
JeremieDoctrine opened this issue Nov 8, 2024 · 1 comment · May be fixed by #72530
Open

Unhandled rejection when using rewrite proxy #72522

JeremieDoctrine opened this issue Nov 8, 2024 · 1 comment · May be fixed by #72530
Labels
bug Issue was opened via the bug report template.

Comments

@JeremieDoctrine
Copy link

JeremieDoctrine commented Nov 8, 2024

Link to the code that reproduces this issue

https://github.com/JeremieDoctrine/next-proxy-issue

To Reproduce

pnpm install
pnpm run dev
curl http://localhost:3000/proxy-path

You can see in the logs

⨯ unhandledRejection: [Error: getaddrinfo ENOTFOUND not-existing-host] {
  errno: -3008,
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'not-existing-host'
}

Current vs. Expected behavior

Currently the proxy is throwing an unhandledRejection.

The expected behavior is not to throw an unhandledRejection.

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.0.0: Tue Sep 24 23:38:45 PDT 2024; root:xnu-11215.1.12~1/RELEASE_ARM64_T8122
  Available memory (MB): 16384
  Available CPU cores: 8
Binaries:
  Node: 21.7.3
  npm: 10.5.0
  Yarn: 1.22.22
  pnpm: 9.12.3
Relevant Packages:
  next: 15.0.4-canary.2 // Latest available version is detected (15.0.4-canary.2).
  eslint-config-next: N/A
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.6.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Not sure

Which stage(s) are affected? (Select all that apply)

next dev (local), next start (local), Other (Deployed)

Additional context

The issue was introduced in this PR : #65759 from @wyattjoh

Commenting this line :

fixes the issue but i'm not sure what is the expected behavior.

@JeremieDoctrine JeremieDoctrine added the bug Issue was opened via the bug report template. label Nov 8, 2024
@JeremieDoctrine JeremieDoctrine linked a pull request Nov 9, 2024 that will close this issue
@JeremieDoctrine
Copy link
Author

I tried a fix here : #72530

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant