diff --git a/packages/next/build/utils.ts b/packages/next/build/utils.ts index 0ff3ee4a50db5fc..d21c7be858a82a4 100644 --- a/packages/next/build/utils.ts +++ b/packages/next/build/utils.ts @@ -586,7 +586,7 @@ export async function isPageStatic( throw new Error( `A required parameter (${validParamKey}) was not provided as ${ repeat ? 'an array' : 'a string' - }.` + } in unstable_getStaticPaths for ${page}` ) } diff --git a/test/integration/prerender-invalid-catchall-params/test/index.test.js b/test/integration/prerender-invalid-catchall-params/test/index.test.js index a213b919d7a3563..d2b47c0c8b0978e 100644 --- a/test/integration/prerender-invalid-catchall-params/test/index.test.js +++ b/test/integration/prerender-invalid-catchall-params/test/index.test.js @@ -11,7 +11,7 @@ describe('Invalid Prerender Catchall Params', () => { const out = await nextBuild(appDir, [], { stderr: true }) expect(out.stderr).toMatch(`Build error occurred`) expect(out.stderr).toMatch( - 'A required parameter (slug) was not provided as an array' + 'A required parameter (slug) was not provided as an array in unstable_getStaticPaths for /[...slug]' ) }) })