How to use the rollbar.reportMessage function in rollbar

To help you get started, we’ve selected a few rollbar examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github JustFixNYC / tenants / app / controllers / activity.server.controller.js View on Github external
//       console.timeEnd("pathSave");
        //       processed.resolve({ url: urls.url, thumb: urls.thumb, exif: _exif });
        //     }).fail(function(err) {
        //       processed.reject(err);
        //     });
        //
        //   });


    } else {

      // exif error (doesn't mean that it found anything)
      // rollbar.handleError(result.error, req);
      console.log(result.error);
      console.log(result.error.toString());
      rollbar.reportMessage(result.error.toString(), "debug");

      console.time("s3PathUpload");

      // upload to s3
      s3Upload(file.path, fileType, false).then(function(urls) {
        console.timeEnd("s3PathUpload");
        processed.resolve({ url: urls.url, thumb: urls.thumb, exif: _exif });
      }).fail(function(err) {
        processed.reject(err);
      });

    }



  });
github JustFixNYC / tenants / app / controllers / tenants / tenants.authentication.server.controller.js View on Github external
var onNewTenantAcct = function(req, userObject) {

  rollbar.reportMessage("New User Signup!", "info", req);

  if(userObject.advocateRole === 'linked') {
    emailHandler.sendNewSignUpEmail(userObject.advocate, userObject.fullName)
      .then(function (response) {
        // console.log('email success', response);
      })
      .catch(function (error) {
        rollbar.handleErrorWithPayloadData("Email notification error", { error: error }, req);
        // console.log('email fail', error);
      });
  }



};
github Runnable / hipcheck / lib / Hipcheck.js View on Github external
options.redisHostname = redisHostSplit[0];
  options.redisPort = redisHostSplit[1];
  options.redisOpts = {
    auth_pass: options.redisPassword
  };

  this.redis = require('redis').createClient(
    options.redisPort,
    options.redisHostname,
    options.redisOpts
  );
  this.redis.on('error', throwError.bind(null, 'Redis Connection Error'));
};

rollbar.init('34dfc593cf14456985c66ffc12c6acc4');
rollbar.reportMessage('heyyyy', 'warn');
github saikat / react-apollo-starter-kit / src / log.js View on Github external
logInstance.error = (err) => {
    existingErrorLogger(err.stack ? err.stack : err)
    try {
      if (enableRollbar) {
        if (typeof err === 'object') {
          rollbar.handleError(err)
        } else if (typeof err === 'string') {
          rollbar.reportMessage(err)
        } else {
          rollbar.reportMessage('Got backend error with no error message')
        }
      }
    } catch (ex) {
      rollbar.reportMessage('Error converting message to rollbar.')
    }
  }
}
github JustFixNYC / tenants / app / controllers / scheduling.server.controller.js View on Github external
return tenant.save();
      })
      .then(function () {

        rollbar.reportMessage("New Appointment Scheduled!", "info", req);
        res.send({
          message: 'Successfully Updated Appt Id'
        });
      })
      .catch(function (err) {
        rollbar.handleErrorWithPayloadData("Scheduling Error", { phone: req.body.appt.phone, error: err }, req);
        res.status(500).send({ message: errorHandler.getErrorMessage(err) });
      });
  } else {
    rollbar.reportMessage("Scheduling webhook didn't find an ID - probably rescheduled?", "info", req);
    res.send({
      message: 'No tenant ID provided'
    });
  }


};
github JustFixNYC / tenants / app / controllers / advocates / advocates.authentication.server.controller.js View on Github external
.then(function (user) {
      rollbar.reportMessage("New Advocate Signup!", "info", req);

      res.json(user);
    })
    .fail(function (err) {
github JustFixNYC / tenants / app / controllers / users / users.authentication.server.controller.js View on Github external
.then(function (userObject) {
                  rollbar.reportMessage("User Sign In", "info", req);
                  res.json(userObject);
                  res.end();
                })
                .catch(function (err) {
github MoveOnOrg / Spoke / src / lib / log.js View on Github external
logInstance.error = err => {
    if (enableRollbar) {
      if (typeof err === "object") {
        rollbar.handleError(err);
      } else if (typeof err === "string") {
        rollbar.reportMessage(err);
      } else {
        rollbar.reportMessage("Got backend error with no error message");
      }
    }

    existingErrorLogger(err && err.stack ? err.stack : err);
  };
}
github MoveOnOrg / Spoke / src / lib / log.js View on Github external
logInstance.error = err => {
    if (enableRollbar) {
      if (typeof err === "object") {
        rollbar.handleError(err);
      } else if (typeof err === "string") {
        rollbar.reportMessage(err);
      } else {
        rollbar.reportMessage("Got backend error with no error message");
      }
    }

    existingErrorLogger(err && err.stack ? err.stack : err);
  };
}
github saikat / react-apollo-starter-kit / src / log.js View on Github external
logInstance.error = (err) => {
    existingErrorLogger(err.stack ? err.stack : err)
    try {
      if (enableRollbar) {
        if (typeof err === 'object') {
          rollbar.handleError(err)
        } else if (typeof err === 'string') {
          rollbar.reportMessage(err)
        } else {
          rollbar.reportMessage('Got backend error with no error message')
        }
      }
    } catch (ex) {
      rollbar.reportMessage('Error converting message to rollbar.')
    }
  }
}