{"record":{"id":"ab64d4b22db6000a","repo":"hpyhacking/peatio","slug":"you-must-pass-a-string-or-handlebars-ast-to-handle-ab64d4","errorCode":null,"errorMessage":"You must pass a string or Handlebars AST to Handlebars.compile. You passed {}","messagePattern":"You must pass a string or Handlebars AST to Handlebars\\.compile\\. You passed (.+?)","errorType":"exception","errorClass":"Handlebars.Exception","httpStatus":null,"severity":"error","filePath":"app/assets/javascripts/swagger-ui/lib/handlebars-1.0.0.js","lineNumber":2152,"sourceCode":"};\n\nHandlebars.precompile = function(input, options) {\n  if (input == null || (typeof input !== 'string' && input.constructor !== Handlebars.AST.ProgramNode)) {\n    throw new Handlebars.Exception(\"You must pass a string or Handlebars AST to Handlebars.precompile. You passed \" + input);\n  }\n\n  options = options || {};\n  if (!('data' in options)) {\n    options.data = true;\n  }\n  var ast = Handlebars.parse(input);\n  var environment = new Compiler().compile(ast, options);\n  return new JavaScriptCompiler().compile(environment, options);\n};\n\nHandlebars.compile = function(input, options) {\n  if (input == null || (typeof input !== 'string' && input.constructor !== Handlebars.AST.ProgramNode)) {\n    throw new Handlebars.Exception(\"You must pass a string or Handlebars AST to Handlebars.compile. You passed \" + input);\n  }\n\n  options = options || {};\n  if (!('data' in options)) {\n    options.data = true;\n  }\n  var compiled;\n  function compile() {\n    var ast = Handlebars.parse(input);\n    var environment = new Compiler().compile(ast, options);\n    var templateSpec = new JavaScriptCompiler().compile(environment, options, undefined, true);\n    return Handlebars.template(templateSpec);\n  }\n\n  // Template is only compiled on first use and cached after that point.\n  return function(context, options) {\n    if (!compiled) {\n      compiled = compile();","sourceCodeStart":2134,"sourceCodeEnd":2170,"githubUrl":"https://github.com/hpyhacking/peatio/blob/dab8641137c008928c835409342519bfef4eae7f/app/assets/javascripts/swagger-ui/lib/handlebars-1.0.0.js#L2134-L2170","documentation":"Error \"You must pass a string or Handlebars AST to Handlebars.compile. You passed {}\" thrown in hpyhacking/peatio.","triggerScenarios":"Thrown at app/assets/javascripts/swagger-ui/lib/handlebars-1.0.0.js:2152 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass the template as a source string (or a Handlebars AST) to Handlebars.compile; convert DOM nodes or other objects to their HTML string first."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"dab8641137c008928c835409342519bfef4eae7f","analyzedAt":"2026-08-23T09:59:18.005Z","schemaVersion":2},"datasetVersion":"2026-08-23T13:39:53.451Z"}