UNPKG

@nestjs/core

Version:

The core of NestJS, a TypeScript framework for Node.js backends: modules, dependency injection and the request pipeline, on Express, Fastify or node:http.

8 lines (7 loc) • 528 B
import { RuntimeException } from './runtime.exception.js'; export class CircularDependencyException extends RuntimeException { constructor(context) { const ctx = context ? ` inside ${context}` : ``; super(`A circular dependency has been detected${ctx}. Please, make sure that each side of a bidirectional relationships are decorated with "forwardRef()". Note that circular relationships between custom providers (e.g., factories) are not supported since functions cannot be called more than once.`); } }