{"record":{"id":"fbabe8f0071e3644","repo":"vercel/next.js","slug":"warning-exceeded-max-tag-count-for-description","errorCode":null,"errorMessage":"Warning: exceeded max tag count for ${description}, dropped tags:","messagePattern":"Warning: exceeded max tag count for (.+?), dropped tags:","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/next/src/server/lib/patch-fetch.ts","lineNumber":153,"sourceCode":"  for (let i = 0; i < tags.length; i++) {\n    const tag = tags[i]\n\n    if (typeof tag !== 'string') {\n      invalidTags.push({ tag, reason: 'invalid type, must be a string' })\n    } else if (tag.length > NEXT_CACHE_TAG_MAX_LENGTH) {\n      invalidTags.push({\n        tag,\n        reason: `exceeded max length of ${NEXT_CACHE_TAG_MAX_LENGTH}`,\n      })\n    } else {\n      // Encode so a non-ASCII tag can be safely serialized into the\n      // `x-next-cache-tags` HTTP header without tripping Node's header\n      // validation. Length is checked on the raw input above.\n      validTags.push(encodeHeaderSafe(tag))\n    }\n\n    if (validTags.length > NEXT_CACHE_TAG_MAX_ITEMS) {\n      console.warn(\n        `Warning: exceeded max tag count for ${description}, dropped tags:`,\n        tags.slice(i).join(', ')\n      )\n      break\n    }\n  }\n\n  if (invalidTags.length > 0) {\n    console.warn(`Warning: invalid tags passed to ${description}: `)\n\n    for (const { tag, reason } of invalidTags) {\n      console.log(`tag: \"${tag}\" ${reason}`)\n    }\n  }\n  return validTags\n}\n\nfunction trackFetchMetric(","sourceCodeStart":135,"sourceCodeEnd":171,"githubUrl":"https://github.com/vercel/next.js/blob/0eb377541648e63402a47b38fee00a8d0ce8f8f1/packages/next/src/server/lib/patch-fetch.ts#L135-L171","documentation":"validateTags (used by patched fetch for cache tags) warns when more than NEXT_CACHE_TAG_MAX_ITEMS tags are passed for a fetch: tags beyond the cap are dropped (and listed in the warning) so the x-next-cache-tags header stays bounded; the fetch itself proceeds.","triggerScenarios":"Thrown at packages/next/src/server/lib/patch-fetch.ts:153 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reduce the number of cache tags per fetch to under the maximum allowed."],"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-14T00:17:10.932Z"}