Ignore more failure states of startViewTransition (#35951)

GitOrigin-RevId: e5aac40612550ea42abdc4d93e80045018670137
This commit is contained in:
Alf Eaton
2026-09-17 11:44:55 +00:00
committed by Copybot
parent 84aa1900f1
commit c302bbaaaa
@@ -119,8 +119,13 @@ export default class PDFJSWrapper {
const transition = container.startViewTransition(setDocument)
transition.ready.catch(err => {
// ignore InvalidStateError, it just means the document was hidden
if (err?.name !== 'InvalidStateError') {
const ignored = [
'InvalidStateError', // the document was hidden, or the viewport was resized
'AbortError', // another transition started
'TimeoutError', // setDocument blocked for too long
]
if (!ignored.includes(err?.name)) {
captureException(err, {
tags: { handler: 'pdf-preview' },
})