hpyhacking/peatio · error

You specified knownHelpersOnly, but used the unknown helper

Error message

You specified knownHelpersOnly, but used the unknown helper {}

What it means

Error "You specified knownHelpersOnly, but used the unknown helper {}" thrown in hpyhacking/peatio.

Source

Thrown at app/assets/javascripts/swagger-ui/lib/handlebars-1.0.0.js:1158

      this.ID(id);
    } else {
      // Simplified ID for `this`
      this.addDepth(id.depth);
      this.opcode('getContext', id.depth);
      this.opcode('pushContext');
    }

    this.opcode('resolvePossibleLambda');
  },

  helperMustache: function(mustache, program, inverse) {
    var params = this.setupFullMustacheParams(mustache, program, inverse),
        name = mustache.id.parts[0];

    if (this.options.knownHelpers[name]) {
      this.opcode('invokeKnownHelper', params.length, name);
    } else if (this.options.knownHelpersOnly) {
      throw new Error("You specified knownHelpersOnly, but used the unknown helper " + name);
    } else {
      this.opcode('invokeHelper', params.length, name);
    }
  },

  ID: function(id) {
    this.addDepth(id.depth);
    this.opcode('getContext', id.depth);

    var name = id.parts[0];
    if (!name) {
      this.opcode('pushContext');
    } else {
      this.opcode('lookupOnContext', id.parts[0]);
    }

    for(var i=1, l=id.parts.length; i<l; i++) {
      this.opcode('lookup', id.parts[i]);

View on GitHub (pinned to dab8641137)

Solutions

  1. Register the helper in the knownHelpers map when compiling with knownHelpersOnly, or remove the knownHelpersOnly option.

When it happens

Trigger: Thrown at app/assets/javascripts/swagger-ui/lib/handlebars-1.0.0.js:1158 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of hpyhacking/peatio@dab8641137 (2026-08-23). Data as JSON: /api/errors/fa697f51341fb34c. Report an issue: GitHub.