mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
chore(main) sendError
This commit is contained in:
parent
3a9b547a2f
commit
3211117bdf
1 changed files with 6 additions and 6 deletions
|
|
@ -354,15 +354,15 @@
|
|||
/**
|
||||
* send error response
|
||||
*/
|
||||
function sendError(pParams, pError) {
|
||||
var p, lRet = checkParams(pParams);
|
||||
function sendError(params, error) {
|
||||
var p, ret = checkParams(params);
|
||||
|
||||
if (lRet) {
|
||||
p = pParams;
|
||||
if (ret) {
|
||||
p = params;
|
||||
p.status = FILE_NOT_FOUND;
|
||||
|
||||
if (!p.data && pError)
|
||||
p.data = pError.toString();
|
||||
if (!p.data && error)
|
||||
p.data = error.toString();
|
||||
|
||||
sendResponse(p);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue