You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After thinking this through, I feel like the listenerForInvokeHandler (where the payload.id access could error) should handle the possible error in the first place. Alternatively, we update the WebSocketCustomListener types to allow returning void | Promise<void> so it's clear that we will handle it accordingly. Reasoning being that there's many APIs out there that return void and it'd be difficult to assume every function could possibly return a rejected promise.
I feel like the listenerForInvokeHandler (where the payload.id access could error) should handle the possible error in the first place.
Where do you think the error should be returned? Should we have error event on the HotChannel?
Alternatively, we update the WebSocketCustomListener types to allow returning void | Promise<void> so it's clear that we will handle it accordingly.
IIRC void | Promise<void> is the same as void because void means it doesn't care about the return value. If we were to change to that, we need to change it to undefined | Promise<void>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p2-edge-caseBug, but has workaround or limited in scope (priority)
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
unhandled rejection error happened when accessing
.idhere if theidproperty was missing.vite/packages/vite/src/node/server/hmr.ts
Line 285 in f261dc9