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

Fix unhandled rejection in proxy-request #72530

Open
wants to merge 1 commit into
base: canary
Choose a base branch
from

Conversation

JeremieDoctrine
Copy link

Trying to fix : #72522

What?

The finally method actually creates a new promise. You have to listen to this new promise instead of the original one or you might end up with unhandled rejection.

Taken from the documentation :

The finally() method of Promise instances schedules a function to be called when the promise is settled (either fulfilled or rejected). It immediately returns another Promise object, allowing you to chain calls to other promise methods.

Why?

see : #72522

How?

Fixes : #72522

@ijjk ijjk added the type: next label Nov 9, 2024
@JeremieDoctrine JeremieDoctrine changed the title Update proxy-request.ts Fix unhandled rejection in proxy-request Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unhandled rejection when using rewrite proxy
2 participants