function _createJsonErrorObject(msg, pointer, httpCode, code, title, meta) {
  let error = {
    detail: msg,
    status: httpCode.toString(),
    title: title,
    code: 'OTX_' + code.toString()
  };

  if (pointer) {
    error.source = {
      pointer: pointer
    };
  }

  if (meta) {
    error.meta = meta;
  }

  return error;
}
// function that creates the Json object to be passed to the payload
function that creates the Json object to be passed to the payload
function that creates the Json object to be passed to the payload
function _createJsonErrorObject(msg, pointer, httpCode, code, title, meta) {
  let error = {
    detail: msg,
    status: httpCode.toString(),
    title: title,
    code: 'OTX_' + code.toString()
  };
  if (pointer) {
    error.source = {
      pointer: pointer
    };
  }
  if (meta) {
    error.meta = meta;
  }
  return error;
}
function _createJsonErrorObject ( msg , pointer , httpCode , code , title , meta ) { let error = { detail : msg , status : httpCode . toString ( ) , title : title , code : 'OTX_' + code . toString ( ) } ; if ( pointer ) { error . source = { pointer : pointer } ; } if ( meta ) { error . meta = meta ; } return error ; }
function that creates the Json object to be passed to the payload
function that creates the Json object to be passed to the payload