mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-14 13:45:36 +03:00
fix(chromium): Add error message to asset when there is one. (#15892)
[196] -- Provide the assert function with with either the error message in the provided object or undefined if there isn't one
This commit is contained in:
parent
829a1b8444
commit
6f47f0f22a
@ -193,7 +193,7 @@ export class CRSession extends EventEmitter {
|
|||||||
} else if (object.id && object.error?.code === -32001) {
|
} else if (object.id && object.error?.code === -32001) {
|
||||||
// Message to a closed session, just ignore it.
|
// Message to a closed session, just ignore it.
|
||||||
} else {
|
} else {
|
||||||
assert(!object.id);
|
assert(!object.id, object?.error?.message || undefined);
|
||||||
Promise.resolve().then(() => {
|
Promise.resolve().then(() => {
|
||||||
if (this._eventListener)
|
if (this._eventListener)
|
||||||
this._eventListener(object.method!, object.params);
|
this._eventListener(object.method!, object.params);
|
||||||
|
Loading…
Reference in New Issue
Block a user