express
express copied to clipboard
Fast, unopinionated, minimalist web framework for node.
Added http exceptions for better error handling created error handling middleware and add bun.lock to .gitignore file
Fixes #6462 ## Problem The `logerror` function in Express was only logging `err.stack`, which doesn't display the error `cause` property introduced in Node.js 16.9.0. This meant that error chains were...
## Summary This PR introduces a helper middleware, `methodNotAllowedCatcher`, to Express. This middleware allows users to easily send a 405 Method Not Allowed response with the correct `Allow` header for...
## Summary Implements deprecation warnings for invalid status codes passed to `res.sendStatus()`, as recommended by maintainers. This provides a smooth migration path from the current throwing behavior to stricter validation...
Fixes #6756 This PR adds type validation to `res.sendStatus()` to prevent uncaught TypeError when BigInt values are passed as status codes. **Problem:** - `res.sendStatus(200n)` caused uncaught `"Do not know how...
Based on https://github.com/nodejs/node/pull/59747
Basically, we support an array as an argument for req.is. This hasn’t been documented, and we should document it on the website. Ref: https://github.com/expressjs/express/blob/8f21493cc57dc32fe059d47abb4210d5b383cc31/lib/request.js#L260
Improve a regular expression that appears twice in the examples which could lead to quadratic runtime if the input is crafted to match `/\{+/` plus some rejecting suffix. In these...
This PR removes the external [`once`](https://www.npmjs.com/package/once) package and replaces it with a modern, internal utility function. The goal is to reduce unnecessary dependencies and simplify the codebase without altering runtime...
Capturing an idea we've talked about offline. It would be great to move to using (and documenting) explicit error codes for errors that express itself generates, to allow folks to...