I would rewrote this to be something like:

try {
  var json = JSON.parse(data);
} catch (e) {
  return response.res(errorcodesAS.JSON_NOTVALID_ERROR);
}

//check the json, return early if is not valid

//send to the msgBroker.

I think the try-catch block is too big and not too beautiful to read.