{"record":{"id":"7ed0d337a619c32f","repo":"vercel/next.js","slug":"expected-sample-param-value-for-segment-rawsegm-7ed0d3","errorCode":null,"errorMessage":"Expected sample param value for segment '${rawSegment}' to be a string, got ${typeof paramValue}","messagePattern":"Expected sample param value for segment '(.+?)' to be a string, got (.+?)","errorType":"validation","errorClass":"InstantValidationError","httpStatus":null,"severity":"error","filePath":"packages/next/src/server/app-render/instant-validation/instant-samples.ts","lineNumber":448,"sourceCode":"            throw new InstantValidationError(\n              `Expected sample param value for segment '${rawSegment}' to be an array of strings, got ${typeof paramValue}`\n            )\n          }\n          interpolatedSegments.push(\n            ...paramValue.map((v) => encodeURIComponent(v))\n          )\n          break\n        }\n        case 'dynamic': {\n          let paramValue = params[param.paramName]\n          if (paramValue === undefined) {\n            // The value for the param was not provided. `usePathname` will detect this and throw\n            // before this can surface to userspace. Use `[NAME]` as a placeholder for the param value\n            // in case it pops up somewhere unexpectedly.\n            paramValue = rawSegment\n          } else if (typeof paramValue !== 'string') {\n            // NOTE: this happens outside of render, so we don't need `trackMissingSampleErrorAndThrow`\n            throw new InstantValidationError(\n              `Expected sample param value for segment '${rawSegment}' to be a string, got ${typeof paramValue}`\n            )\n          }\n          interpolatedSegments.push(encodeURIComponent(paramValue))\n          break\n        }\n        case 'catchall-intercepted-(..)(..)':\n        case 'catchall-intercepted-(.)':\n        case 'catchall-intercepted-(..)':\n        case 'catchall-intercepted-(...)':\n        case 'dynamic-intercepted-(..)(..)':\n        case 'dynamic-intercepted-(.)':\n        case 'dynamic-intercepted-(..)':\n        case 'dynamic-intercepted-(...)': {\n          // TODO(instant-validation-build): i don't know how these are supposed to work, or if we can even get them here\n          throw new InvariantError(\n            'Not implemented: Validation of interception routes'\n          )","sourceCodeStart":430,"sourceCodeEnd":466,"githubUrl":"https://github.com/vercel/next.js/blob/0eb377541648e63402a47b38fee00a8d0ce8f8f1/packages/next/src/server/app-render/instant-validation/instant-samples.ts#L430-L466","documentation":"Type check while interpolating sample params during instant validation: a dynamic (single) segment's param value was expected to be a plain string but had another type. The faulting input is the samples configuration entry supplying that segment's value.","triggerScenarios":"A dynamic segment sample param value is not a string.","commonSituations":"Instant validation sample data provides a non-string value for a single dynamic segment.","solutions":["Provide a string for the dynamic segment sample param in instant validation config."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0eb377541648e63402a47b38fee00a8d0ce8f8f1","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}