mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore: provide better message for unhandled internal server errors (#28653)
This changes error message from `Error: ` to `Error: Protocol error (Fetch.continueRequest): Internal server error, session closed.` when running `npm run ctest -- --repeat-each 100 -x --headed --timeout 3000 --workers 1 library/browsercontext-route.spec.ts:172` prior to 9d91b7caf51003cb5c11ec0cdeb8431ca0411aa9.
This commit is contained in:
parent
f28ceffa37
commit
f8d0204d2f
@ -190,6 +190,7 @@ export class CRSession extends EventEmitter {
|
||||
this._closed = true;
|
||||
this._connection._sessions.delete(this._sessionId);
|
||||
for (const callback of this._callbacks.values()) {
|
||||
callback.error.setMessage(`Internal server error, session closed.`);
|
||||
callback.error.type = this._crashed ? 'crashed' : 'closed';
|
||||
callback.error.logs = this._connection._browserDisconnectedLogs;
|
||||
callback.reject(callback.error);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user