Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Upgrading from v1.x to v2.x

## Breaking Changes:

### [2.0.0]- 2020-7-28

* Removes `crashProtector` middleware which was using the [Node.js Domain api](https://nodejs.org/api/domain.html) which has been deprecated.

[2.0.0]:https://github.com/shutterstock/node-common-errors/compare/v1.1.0...v2.0.0
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ throw new ArgumentNullError("username");

### Crash Protector

Express middleware for preventing the web server from crashing when an error is thrown from an asynchronous context.
Express middleware for preventing the web server from crashing when an error is thrown from an asynchronous context.
Any error that would have caused a crash is logged to *stderr*.

```js
Expand All @@ -900,7 +900,6 @@ var app = express();

app.use(express.static(__dirname + '/../public'));
app.use(express.bodyParser());
app.use(errors.middleware.crashProtector());

//insert new middleware here

Expand All @@ -924,7 +923,6 @@ var app = express();

app.use(express.static(__dirname + '/../public'));
app.use(express.bodyParser());
app.use(errors.middleware.crashProtector());

//insert new middleware here

Expand Down
1 change: 0 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ var exports = module.exports = {
},
middleware: {
errorHandler: require('./lib/middleware/errorHandler'),
crashProtector: require('./lib/middleware/crashProtector')
}
};

Expand Down
34 changes: 0 additions & 34 deletions lib/middleware/crashProtector.js

This file was deleted.