Commit 5a31f4f79b352f8a08ad79ce1f1508b0df086696

Authored by Nattapon Wongpaet
1 parent 72186717
Exists in master and in 1 other branch dev

update handler unknow

Showing 1 changed file with 11 additions and 1 deletions   Show diff stats
ais-structure/src/config/express.js
... ... @@ -286,7 +286,17 @@ module.exports = function () {
286 286 log.logSummary(req,JSON.parse(req.res.resBody));
287 287 }else
288 288 {
289   - res.status(200).json(responseMsg.unknow(req));
  289 +
  290 + var response = responseMsg.unknow(req);
  291 +
  292 +
  293 + log.startlog(req,req.method+"_"+"Unknow","Unknow","Unknow");
  294 + log.logDetail.addInput(req,"Unknow",req.method+"_"+"Unknow","Request",req,req.body);
  295 + log.logDetail.addOutput(req,"Unknow",req.method+"_"+"Unknow","Response",response,response);
  296 +
  297 + log.addErrorSummary(req,req.body.clientName,req.method+"_"+"Unknow","null","Unknown URL");
  298 + res.status(200).json(response);
  299 + log.logSummary(req,response);
290 300 }
291 301  
292 302 log.endEC(req,res);
... ...