File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -389,15 +389,15 @@ const getDeviceName = ({
389389 } finally {
390390 if ( ! driver ) return ;
391391
392- const reason = errorMessage ?. replace ( / " / g, "'" ) || "" ;
392+ try {
393+ const reason = errorMessage ?. replace ( / " / g, "'" ) || "" ;
393394
394- driver . executeScript (
395- `browserstack_executor: {"action": "setSessionStatus", "arguments": {"status":"${
396- errorMessage ? "failed" : "passed"
397- } ","reason": "${ reason } "}}`
398- ) ;
395+ driver . executeScript (
396+ `browserstack_executor: {"action": "setSessionStatus", "arguments": {"status":"${
397+ errorMessage ? "failed" : "passed"
398+ } ","reason": "${ reason } "}}`
399+ ) ;
399400
400- try {
401401 const sessionId = await driver . getSession ( ) ;
402402 console . log ( { sessionId : sessionId ?. id_ } ) ;
403403 if ( sessionId ?. id_ ) await driver . quit ( ) ;
You can’t perform that action at this time.
0 commit comments