Documents injecute 1.x · Migrating from 0.x
Skip to content

INJECUTE_EXTENSION_RESULT ​

An extension returned a container that is not this one or its child.

How to fix it ​

A module function must return the registry it received (after adding services) or a fork of it.

Handling it in code ​

ts
import { InjecuteError } from 'injecute';

try {
  // ...
} catch (error) {
  if (error instanceof InjecuteError && error.code === 'INJECUTE_EXTENSION_RESULT') {
    // error.message explains what happened; error.path is the resolution chain
  }
}

All error codes

Released under the MIT License.