inspector: return errors when CDP protocol event emission fails#62162
Open
islandryu wants to merge 1 commit intonodejs:mainfrom
Open
inspector: return errors when CDP protocol event emission fails#62162islandryu wants to merge 1 commit intonodejs:mainfrom
islandryu wants to merge 1 commit intonodejs:mainfrom
Conversation
Collaborator
|
Review requested:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #62162 +/- ##
==========================================
+ Coverage 89.65% 89.70% +0.04%
==========================================
Files 676 676
Lines 206543 206640 +97
Branches 39547 39550 +3
==========================================
+ Hits 185184 185366 +182
+ Misses 13480 13465 -15
+ Partials 7879 7809 -70
🚀 New features to boost your workflow:
|
legendecas
reviewed
Mar 9, 2026
| Isolate* isolate = Isolate::GetCurrent(); | ||
| if (!ObjectGetProtocolString(context, storage_id_obj, "securityOrigin") | ||
| .To(&security_origin)) { | ||
| ThrowEventError(isolate, "Missing securityOrigin in storageId"); |
Member
There was a problem hiding this comment.
IIUC, this would throw an identical error for each session connected. Can we validate the object shape once so that the error is only thrown once? This would also prevent returning an array of errors in the JS API.
legendecas
reviewed
Mar 9, 2026
| --> | ||
|
|
||
| * `params` {Object} | ||
| * Returns: {Array} An array of errors from each session |
Member
There was a problem hiding this comment.
Preferrably, an array of errors should be thrown as AggregateError.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Previously, there was no feedback when functions that emit events such as
Network.webSocketCreatedfailed. This change modifies the behavior so that feedback can be obtained when such failures occur.Since an event may be emitted to multiple sessions, instead of throwing an error directly, the errors are returned as an array.