mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-08 16:05:05 -04:00
Added more types.
This commit is contained in:
parent
545c7c6060
commit
03e73053cb
16 changed files with 167 additions and 81 deletions
|
@ -1,19 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
const stats = require('../../stats');
|
||||
|
||||
exports.expressCreateServer = (hook_name, args, cb) => {
|
||||
exports.app = args.app;
|
||||
|
||||
// Handle errors
|
||||
args.app.use((err, req, res, next) => {
|
||||
// if an error occurs Connect will pass it down
|
||||
// through these "error-handling" middleware
|
||||
// allowing you to respond however you like
|
||||
res.status(500).send({error: 'Sorry, something bad happened!'});
|
||||
console.error(err.stack ? err.stack : err.toString());
|
||||
stats.meter('http500').mark();
|
||||
});
|
||||
|
||||
return cb();
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue