nest icon indicating copy to clipboard operation
nest copied to clipboard

fix(core): patch body.errorLogger undefined on express-adapter.ts

Open ryanhs opened this issue 1 year ago • 3 comments
trafficstars

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: N/A

TypeError: body.errorLogger is not a function at /app/node_modules/@nestjs/platform-express/adapters/express-adapter.js:51:26 at node:internal/util:464:12 at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

What is the new behavior?

correct behaviour using errorHandler from StreamableFile

Does this PR introduce a breaking change?

  • [ ] Yes
  • [x] No

Other information

ryanhs avatar Aug 07 '24 06:08 ryanhs

Pull Request Test Coverage Report for Build 77714cdf-f9ba-490c-aaf7-b5662c25e04d

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 92.208%

Totals Coverage Status
Change from base Build 875294d7-6fa4-40f6-9340-1a6d68f34376: 0.0%
Covered Lines: 6745
Relevant Lines: 7315

💛 - Coveralls

coveralls avatar Aug 07 '24 06:08 coveralls

@ryanhs can you please share a minimum reproduction of that bug?

micalevisk avatar Aug 11 '24 19:08 micalevisk

I would need a reproduction of the bug to be able to approve this. The only time this code should be called is if, for whatever reason, the errorHandler of the StreamableFile fails and there needs to be a log of it happening

jmcdo29 avatar Aug 19 '24 21:08 jmcdo29

I just had to upgrade @nestjs/common to fix this

sezanzeb avatar Nov 05 '24 14:11 sezanzeb