nest
nest copied to clipboard
fix(core): make `isHttpError` check stricter
PR Checklist
Please check if your PR fulfills the following requirements:
- [x] The commit message follows our guidelines: https://github.com/nestjs/nest/blob/master/CONTRIBUTING.md
- [x] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
PR Type
What kind of change does this PR introduce?
- [x] 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: https://github.com/nestjs/nest/issues/14738
What is the new behavior?
The new logic is stricter and almost the same as the one in http-errors library.
Additional check for expose property for example should remove a lot of false positives like ResponseError from ElasticSearch SDK.
Does this PR introduce a breaking change?
Not sure
Pull Request Test Coverage Report for Build 68c3bd7c-e773-48d8-8b6a-74e3bd54e306
Details
- 4 of 5 (80.0%) changed or added relevant lines in 1 file are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage decreased (-0.008%) to 89.284%
| Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
|---|---|---|---|
| packages/core/exceptions/base-exception-filter.ts | 4 | 5 | 80.0% |
| <!-- | Total: | 4 | 5 |
| Totals | |
|---|---|
| Change from base Build 93d1c816-7d3c-41c5-b5e6-91437bb286af: | -0.008% |
| Covered Lines: | 7149 |
| Relevant Lines: | 8007 |
💛 - Coveralls
Added FastifyError handling
@kamilmysliwiec what does the status: blocked mean?
@glebbash it means that this PR may introduce a breaking change. Something to investigate, evaluate risks etc