{"record":{"id":"227fc649e9135eb2","repo":"discourse/discourse","slug":"typeerror-message","errorCode":null,"errorMessage":"${typeError.message}","messagePattern":"\\$\\{typeError\\.message\\}","errorType":"validation","errorClass":"BlockError","httpStatus":null,"severity":"error","filePath":"frontend/discourse/app/lib/blocks/-internals/validation/args.ts","lineNumber":1121,"sourceCode":"      );\n    }\n  }\n\n  for (const [argName, argDef] of Object.entries(schema)) {\n    const value = providedArgs[argName];\n\n    // 2. Check required args\n    if (argDef.required && value === undefined) {\n      throw new BlockError(`missing required ${pathPrefix}.${argName}.`, {\n        path: `${pathPrefix}.${argName}`,\n      });\n    }\n\n    // 3. Validate type if value is provided\n    if (value !== undefined) {\n      const typeError = validateArgValue(value, argDef, argName, options);\n      if (typeError) {\n        throw new BlockError(typeError.message, {\n          path: `${pathPrefix}.${typeError.path}`,\n        });\n      }\n    }\n  }\n}\n","sourceCodeStart":1103,"sourceCodeEnd":1128,"githubUrl":"https://github.com/discourse/discourse/blob/1b2d7253e854205d2c95c80b2c6a1cdd42e45059/frontend/discourse/app/lib/blocks/-internals/validation/args.ts#L1103-L1128","documentation":"Error \"${typeError.message}\" thrown in discourse/discourse.","triggerScenarios":"Thrown at frontend/discourse/app/lib/blocks/-internals/validation/args.ts:1121 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1b2d7253e854205d2c95c80b2c6a1cdd42e45059","analyzedAt":"2026-08-26T03:11:08.302Z","schemaVersion":2},"datasetVersion":"2026-08-26T07:17:17.940Z"}