mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
replaced all stop callbacks with customError callbacks. Fixes #270
This commit is contained in:
parent
22fd5ae33d
commit
6684d6ed52
7 changed files with 59 additions and 38 deletions
|
@ -115,9 +115,9 @@ exports.handle = function(functionName, fields, req, res)
|
|||
res.send({code: 0, message: "ok", data: data});
|
||||
}
|
||||
// parameters were wrong and the api stopped execution, pass the error
|
||||
else if(err.stop)
|
||||
else if(err.name == "apierror")
|
||||
{
|
||||
res.send({code: 1, message: err.stop, data: null});
|
||||
res.send({code: 1, message: err.message, data: null});
|
||||
}
|
||||
//an unkown error happend
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue