Skip to content

Incorrect handling upstream errors #1729

Open
@ArtemHoruzhenko

Description

@ArtemHoruzhenko

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

I'm getting 404 Cannon POST url instead of 413 Payload Too Large from bodyParser for excluded urls (/api/*any)

Minimum reproduction code

https://github.com/ArtemHoruzhenko/nestjs-serve-static-bug-repro

Steps to reproduce

  1. npm install
  2. npm run start:dev
  3. curl -X POST 'http://localhost:3000/api/test' \ -H 'Content-Type: application/json' \ --data-raw '{"v":1234567890}'

Expected behavior

should see 413 Payload too Large error

Package version

5.0.3

NestJS version

11

Node.js version

22

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions