( prepared: CloudWebDriverPreparedSession, primaryError: unknown, )
| 440 | } |
| 441 | |
| 442 | async function cleanupAfterCreateSessionFailure( |
| 443 | prepared: CloudWebDriverPreparedSession, |
| 444 | primaryError: unknown, |
| 445 | ): Promise<void> { |
| 446 | try { |
| 447 | await prepared.cleanup?.(); |
| 448 | } catch (cleanupError) { |
| 449 | if (primaryError instanceof AppError) { |
| 450 | primaryError.details = { |
| 451 | ...primaryError.details, |
| 452 | cleanupError: errorMessage(cleanupError), |
| 453 | }; |
| 454 | } |
| 455 | } |
| 456 | } |
no test coverage detected
searching dependent graphs…