Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(common): Improve error handling for undefined tokens #13056

Conversation

mostafa8026
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

Issue Number: #12914

What is the new behavior?

In response to issue #12914, this commit enhances the Nest.js injector for better debugging efficiency. The improvement involves throwing a specific error when a token is undefined, aiding developers in quicker problem identification and resolution. The error message provides guidance on potential circular dependencies and references for further assistance.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

In response to issue nestjs#12914, this commit enhances the Nest.js injector for better debugging efficiency. The improvement involves throwing a specific error when a token is undefined, aiding developers in quicker problem identification and resolution. The error message provides guidance on potential circular dependencies and references for further assistance.

Closes nestjs#12914
@coveralls
Copy link

Pull Request Test Coverage Report for Build 8c8b0ae6-86ff-4e3d-b17d-10e4c691c7bb

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.002%) to 92.102%

Totals Coverage Status
Change from base Build f42571a3-e995-44ff-b865-50a8a11b32b7: 0.002%
Covered Lines: 6717
Relevant Lines: 7293

💛 - Coveralls

Copy link
Member

@micalevisk micalevisk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

btw this is not a perf change but a feat (according to angular convetions)

@mostafa8026
Copy link
Contributor Author

I can change my commit message and therefore the PR title if you're ok with that.

@kamilmysliwiec kamilmysliwiec merged commit b3f84f4 into nestjs:master Jan 23, 2024
3 checks passed
@Clashsoft
Copy link

This is a breaking change. See #12914 (comment)

@kamilmysliwiec
Copy link
Member

Reverted #13370

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants