next.js
40767e5c - fix(#40066): preserve error status code from serveStatic (#40128)

Commit
3 years ago
fix(#40066): preserve error status code from serveStatic (#40128) The PR fixes #40066. Next.js' `serveStatic` method is powered by the [send](https://github.com/pillarjs/send) module, which could throw errors under specific circumstances. Currently, Next.js only preserves the 412 Error from send, hence issue #40066 (where 416 Error is not preserved). ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md`
Author
Parents
Loading