{"record":{"id":"5e8ecb44190d1901","repo":"remix-run/remix","slug":"message","errorCode":null,"errorMessage":"${message}","messagePattern":"\\$\\{message\\}","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/assets/src/lib/files/config.ts","lineNumber":360,"sourceCode":"    seen.add(normalizedExtension)\n    normalizedExtensions.push(normalizedExtension)\n  }\n\n  return normalizedExtensions\n}\n\nexport function serializeAssetTransformInvocations<transforms extends AssetRequestTransformMap>(\n  transforms: readonly AssetTransformInvocation<transforms>[],\n  transformsByName: ResolvedAssetRequestTransformMap,\n  maxTransforms = defaultMaxRequestTransforms,\n): string[] {\n  if (transforms.length > maxTransforms) {\n    throw new TypeError(`Expected at most ${maxTransforms} request transforms`)\n  }\n\n  return transforms.map((transformInvocation) =>\n    normalizeAssetTransformInvocation(transformInvocation, transformsByName, (message) => {\n      throw new TypeError(message)\n    }),\n  )\n}\n\nexport function parseAssetTransformInvocations(\n  transformsQuery: readonly string[],\n  transformsByName: ResolvedAssetRequestTransformMap,\n  maxTransforms = defaultMaxRequestTransforms,\n): readonly (string | readonly [string, string])[] {\n  if (transformsQuery.length > maxTransforms) {\n    throw new TypeError(`Expected at most ${maxTransforms} request transforms`)\n  }\n\n  return transformsQuery.map((transformQuery) =>\n    parseSerializedAssetTransformInvocation(transformQuery, transformsByName, (message) => {\n      throw new TypeError(message)\n    }),\n  )","sourceCodeStart":342,"sourceCodeEnd":378,"githubUrl":"https://github.com/remix-run/remix/blob/9696913134be3a4423513d2775f7b31d6917c049/packages/assets/src/lib/files/config.ts#L342-L378","documentation":"While serializing request transform invocations, each entry is normalized by normalizeAssetTransformInvocation; if an entry is malformed (unknown transform name, bad argument shape, etc.) the nested validator's message is re-thrown as a TypeError from serializeAssetTransformInvocations.","triggerScenarios":"Passing an invocation whose name is not in transformsByName, or whose args don't match the transform's declared argument types, to getHrefTransform/serializeAssetTransformInvocations.","commonSituations":"Renaming or removing a registered transform while stale references (cached URLs, old client bundles) still request it; typos in transform names; passing raw strings instead of invocation objects.","solutions":["Check the exact nested message for the offending field and fix that entry","Verify every invocation name exists in the resolved transforms map before serializing","Regenerate/clear cached transform URLs after changing the transform registry"],"exampleFix":"// before\ngetHrefTransform([{ name: 'minifyy', args: [] }], map)\n// after\ngetHrefTransform([{ name: 'minify', args: [] }], map)","handlingStrategy":"try-catch","validationCode":"const valid = invocations.every((i) => i.name in transformsByName)\nif (!valid) throw new Error('unknown transform name')","typeGuard":"function isKnownTransform(name: string, map: ResolvedAssetRequestTransformMap): boolean {\n  return name in map\n}","tryCatchPattern":"try { serializeAssetTransformInvocations(list, map) } catch (e) { if (e instanceof TypeError) logBadInvocation(e.message); throw e }","preventionTips":["Derive invocation names from the registered map, never hardcode strings","Type invocations against the map's keys"],"tags":["assets","transforms","validation"],"backgroundTag":"invalid-option-value","analyzedSha":"9696913134be3a4423513d2775f7b31d6917c049","analyzedAt":"2026-08-27T19:55:01.024Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}