You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a fairly large and complex Nest.js application and in a recent upgrade from 10.1.2 to 10.4.15, our application would run successfully but integration test suites began failing with a RangeError: Maximum call stack size exceeded exception when attempting to setup our App module for testing with Test.createTestingModule. We were getting the error in almost any case even when only creating a testing module with as few modules as possible. Eventually we realized that exceptions thrown in our code were being caught and swallowed. For instance we could leave out a required environment variable from our Config service and it was throwing the expected error for the undefined configuration value but this was masked by the RangeError. Eventually, we determined that this was caused by recent changes to packages/core/injector/injector.ts, we were able to comment out the changes locally and our test would throw the expected exception.
Thus, in fairly complex Nest.js Apps this recent change may be swallowing exceptions and throwing a misleading exception.
Minimum reproduction code
No response
Input code
Expected behavior
Exceptions in application code should not be swallowed by catches within the Nest.js framework.
Other
Node.js 22.11.0, Typescript 5.7.2
The text was updated successfully, but these errors were encountered:
Did you read the migration guide?
Is there an existing issue that is already proposing this?
Potential Commit/PR that introduced the regression
PR #14133 / Commit 229d97f
NestJS version
10.1.2 -> 10.4.15
Describe the regression
We have a fairly large and complex Nest.js application and in a recent upgrade from 10.1.2 to 10.4.15, our application would run successfully but integration test suites began failing with a
RangeError: Maximum call stack size exceeded
exception when attempting to setup our App module for testing withTest.createTestingModule
. We were getting the error in almost any case even when only creating a testing module with as few modules as possible. Eventually we realized that exceptions thrown in our code were being caught and swallowed. For instance we could leave out a required environment variable from our Config service and it was throwing the expected error for the undefined configuration value but this was masked by theRangeError
. Eventually, we determined that this was caused by recent changes topackages/core/injector/injector.ts
, we were able to comment out the changes locally and our test would throw the expected exception.Thus, in fairly complex Nest.js Apps this recent change may be swallowing exceptions and throwing a misleading exception.
Minimum reproduction code
No response
Input code
Expected behavior
Exceptions in application code should not be swallowed by catches within the Nest.js framework.
Other
Node.js 22.11.0, Typescript 5.7.2
The text was updated successfully, but these errors were encountered: