hpyhacking/peatio · error

Injectable functions cannot be called at configuration time

Error message

Injectable functions cannot be called at configuration time

What it means

Error "Injectable functions cannot be called at configuration time" thrown in hpyhacking/peatio.

Source

Thrown at app/assets/javascripts/lib/angular-ui-router.js:1117

  };

  function getDefaultConfig() {
    return {
      strict: isStrictMode,
      caseInsensitive: isCaseInsensitive
    };
  }

  function isInjectable(value) {
    return (isFunction(value) || (isArray(value) && isFunction(value[value.length - 1])));
  }

  /**
   * [Internal] Get the default value of a parameter, which may be an injectable function.
   */
  $UrlMatcherFactory.$$getDefaultValue = function(config) {
    if (!isInjectable(config.value)) return config.value;
    if (!injector) throw new Error("Injectable functions cannot be called at configuration time");
    return injector.invoke(config.value);
  };

  /**
   * @ngdoc function
   * @name ui.router.util.$urlMatcherFactory#caseInsensitive
   * @methodOf ui.router.util.$urlMatcherFactory
   *
   * @description
   * Defines whether URL matching should be case sensitive (the default behavior), or not.
   *
   * @param {boolean} value `false` to match URL in a case sensitive manner; otherwise `true`;
   */
  this.caseInsensitive = function(value) {
    isCaseInsensitive = value;
  };

  /**

View on GitHub (pinned to dab8641137)

Solutions

  1. Move the injectable function invocation out of the config phase into a run block, controller, service, or resolve; configuration-time code cannot use runtime injections.

When it happens

Trigger: Thrown at app/assets/javascripts/lib/angular-ui-router.js:1117 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/5eb469b53f8f7e5e. Report an issue: GitHub.