Skip to content

Commit 1aeba8a

Browse files
authored
chore: improve view transition time out error message (#8515)
1 parent 0658d23 commit 1aeba8a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

packages/qwik-router/src/runtime/src/qwik-router-component.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -817,6 +817,11 @@ export const useQwikRouter = (props?: QwikRouterProps) => {
817817
.catch((err) => {
818818
// If the view transition fails, navigate to the page anyway
819819
navigate();
820+
if (err instanceof DOMException && err.name === 'TimeoutError') {
821+
throw new Error(
822+
'View transition timed out. This can happen if you have "disableCache" in your browser devtools enabled.'
823+
);
824+
}
820825
// Re-throw the error on console
821826
throw err;
822827
})

0 commit comments

Comments
 (0)