mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
Fixed typescript checks.
This commit is contained in:
parent
fd9b5d0ff3
commit
be49d75fde
7 changed files with 81 additions and 25 deletions
|
@ -6,17 +6,16 @@ import {ErrorCaused} from "../../types/ErrorCaused";
|
|||
const stats = require('../../stats')
|
||||
|
||||
exports.expressCreateServer = (hook_name:string, args: ArgsExpressType, cb:Function) => {
|
||||
exports.app = args.app;
|
||||
|
||||
// Handle errors
|
||||
/*args.app.use((req:any, res:any, next:Function) => {
|
||||
args.app.set_error_handler((req, res, error)=>{
|
||||
// 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());
|
||||
res.status(500).json({error: 'Sorry, something bad happened!'});
|
||||
console.error(error.stack ? error.stack : error.toString());
|
||||
stats.meter('http500').mark();
|
||||
});*/
|
||||
})
|
||||
|
||||
|
||||
return cb();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue