[{"data":1,"prerenderedAt":203},["ShallowReactive",2],{"content-\u002Fe\u002Faf14":3},{"id":4,"title":5,"body":6,"condition":194,"description":195,"extension":196,"meta":197,"navigation":198,"path":199,"seo":200,"stem":201,"__hash__":202},"errors\u002Fe\u002Faf14.md","AF14",{"type":7,"value":8,"toc":190},"minimark",[9,13,25,28,33,36,40,43,174,186],[10,11,5],"h1",{"id":12},"af14",[14,15,16],"p",{},[17,18,19,20,24],"strong",{},"A ",[21,22,23],"code",{},"register({ transforms })"," function threw while processing a write, and the write was aborted.",[14,26,27],{},"In development the console shows the full picture: the path, the transform's index and name, a remediation hint, and the original error with its stack. In production the log is exactly the code line you followed here, with none of those details.",[29,30,32],"h2",{"id":31},"why-production-redacts-this","Why production redacts this",[14,34,35],{},"Transform bodies are your code, and their thrown errors can embed anything the user just typed. Attaform treats messages and stack frames from inside a transform as an information-leak surface, so the production log is a fixed string. Run the development build to see the original error.",[29,37,39],{"id":38},"how-to-fix-it","How to fix it",[14,41,42],{},"Transforms must not throw. Wrap recoverable logic in the transform's own try\u002Fcatch and return the fallback you want written:",[44,45,50],"pre",{"className":46,"code":47,"language":48,"meta":49,"style":49},"language-ts shiki shiki-themes github-light github-dark","const rv = form.register('amount', {\n  transforms: [\n    (raw) => {\n      try {\n        return normalizeCurrency(raw)\n      } catch {\n        return raw\n      }\n    },\n  ],\n})\n","ts","",[21,51,52,86,92,111,119,131,142,150,156,162,168],{"__ignoreMap":49},[53,54,57,61,65,68,72,76,79,83],"span",{"class":55,"line":56},"line",1,[53,58,60],{"class":59},"szBVR","const",[53,62,64],{"class":63},"sj4cs"," rv",[53,66,67],{"class":59}," =",[53,69,71],{"class":70},"sVt8B"," form.",[53,73,75],{"class":74},"sScJk","register",[53,77,78],{"class":70},"(",[53,80,82],{"class":81},"sZZnC","'amount'",[53,84,85],{"class":70},", {\n",[53,87,89],{"class":55,"line":88},2,[53,90,91],{"class":70},"  transforms: [\n",[53,93,95,98,102,105,108],{"class":55,"line":94},3,[53,96,97],{"class":70},"    (",[53,99,101],{"class":100},"s4XuR","raw",[53,103,104],{"class":70},") ",[53,106,107],{"class":59},"=>",[53,109,110],{"class":70}," {\n",[53,112,114,117],{"class":55,"line":113},4,[53,115,116],{"class":59},"      try",[53,118,110],{"class":70},[53,120,122,125,128],{"class":55,"line":121},5,[53,123,124],{"class":59},"        return",[53,126,127],{"class":74}," normalizeCurrency",[53,129,130],{"class":70},"(raw)\n",[53,132,134,137,140],{"class":55,"line":133},6,[53,135,136],{"class":70},"      } ",[53,138,139],{"class":59},"catch",[53,141,110],{"class":70},[53,143,145,147],{"class":55,"line":144},7,[53,146,124],{"class":59},[53,148,149],{"class":70}," raw\n",[53,151,153],{"class":55,"line":152},8,[53,154,155],{"class":70},"      }\n",[53,157,159],{"class":55,"line":158},9,[53,160,161],{"class":70},"    },\n",[53,163,165],{"class":55,"line":164},10,[53,166,167],{"class":70},"  ],\n",[53,169,171],{"class":55,"line":170},11,[53,172,173],{"class":70},"})\n",[14,175,176,181,182,185],{},[177,178,180],"a",{"href":179},"\u002Fdocs\u002Fbinding-inputs\u002Ftransforms","Transforms"," covers the pipeline, including async transforms, whose rejections surface on ",[21,183,184],{},"field.transformError"," instead of the console.",[187,188,189],"style",{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":49,"searchDepth":88,"depth":88,"links":191},[192,193],{"id":31,"depth":88,"text":32},{"id":38,"depth":88,"text":39},"A `register` transform threw and the write was aborted","A register transform threw, so the write was aborted. Production logs redact the details deliberately; development shows the path, index, and error.","md",{},true,"\u002Fe\u002Faf14",{"title":5,"description":195},"e\u002Faf14","3ARKiZg0Wm_aWMnrmMrlS6MacPhdiPifr4DyZwbt2K4",1787641563502]