diff --git a/packages/next/src/client/components/parallel-route-default.tsx b/packages/next/src/client/components/parallel-route-default.tsx
index 4c938945f6e55..8ea1065713ea6 100644
--- a/packages/next/src/client/components/parallel-route-default.tsx
+++ b/packages/next/src/client/components/parallel-route-default.tsx
@@ -1,3 +1,5 @@
+import { notFound } from './not-found'
+
export default function NoopParallelRouteDefault() {
- return null
+ notFound()
}
diff --git a/test/e2e/app-dir/parallel-routes-and-interception/app/intercepting-parallel-modal/[username]/@modal/default.js b/test/e2e/app-dir/parallel-routes-and-interception/app/intercepting-parallel-modal/[username]/@modal/default.js
new file mode 100644
index 0000000000000..a6a4d62eae872
--- /dev/null
+++ b/test/e2e/app-dir/parallel-routes-and-interception/app/intercepting-parallel-modal/[username]/@modal/default.js
@@ -0,0 +1,3 @@
+export default function Page({ params }) {
+ return
default modal slot
+}
diff --git a/test/e2e/app-dir/parallel-routes-and-interception/parallel-routes-and-interception.test.ts b/test/e2e/app-dir/parallel-routes-and-interception/parallel-routes-and-interception.test.ts
index d0343dd8bffff..fc44c95998d4d 100644
--- a/test/e2e/app-dir/parallel-routes-and-interception/parallel-routes-and-interception.test.ts
+++ b/test/e2e/app-dir/parallel-routes-and-interception/parallel-routes-and-interception.test.ts
@@ -185,6 +185,27 @@ createNextDescribe(
expect(html).toContain('parallel/(new)/layout')
expect(html).toContain('parallel/(new)/@baz/nested/page')
})
+
+ it('should throw a 404 when no matching parallel route is found', async () => {
+ const browser = await next.browser('/parallel-tab-bar')
+ // we make sure the page is available through navigating
+ await check(
+ () => browser.waitForElementByCss('#home').text(),
+ 'Tab bar page (@children)'
+ )
+ await browser.elementByCss('#view-duration-link').click()
+ await check(
+ () => browser.waitForElementByCss('#view-duration').text(),
+ 'View duration'
+ )
+
+ // fetch /parallel-tab-bar/view-duration
+ const res = await next.fetch(
+ `${next.url}/parallel-tab-bar/view-duration`
+ )
+ const html = await res.text()
+ expect(html).toContain('page could not be found')
+ })
})
describe('route intercepting', () => {