chore(bidi): rewrite serialization error message#40490
chore(bidi): rewrite serialization error message#40490hbenl wants to merge 1 commit intomicrosoft:mainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
c625158 to
a493c34
Compare
Test results for "MCP"12 failed 6809 passed, 927 skipped Merge workflow run. |
Test results for "tests 1"3 flaky41476 passed, 847 skipped Merge workflow run. |
| } | ||
|
|
||
| function rewriteError(error: Error): never { | ||
| if (error.message.includes('too much recursion') || error.message.includes('stack limit exceeded')) |
There was a problem hiding this comment.
I think 'InternalError: too much recursion' is a message that is thrown for any stack overflow error, not just JSON serialization. We should discriminate those from from JSON.serialize() issue. Wouldn't it be more appropriate to check for something like "TypeError: cyclic object value"
?
There was a problem hiding this comment.
'InternalError: too much recursion' is all we're getting from Firefox. Note that exceptions from the user's evaluated code won't end up here because if the evaluation throws then script.callFunction returns a response with response.type === 'exception' instead of rethrowing that exception.
Fixes "should throw for too deep reference chain" in
page/page-evaluate.spec.ts.