How to use the requestHandler function from raven

Find comprehensive JavaScript raven.requestHandler code examples handpicked from public code repositorys.

31
32
33
34
35
36
37
38
39
40
 * Returns a Sentry request handler in case
 * Sentry client is set up.
 */
exports.requestHandler = () => {
  if (SENTRY_DSN) {
    return Raven.requestHandler();
  } else {
    return (req, res, next) => {
      next();
    };
fork icon958
star icon0
watch icon4

11
12
13
14
15
16
17
18
19
20
  return (req, res, next) => {
    if (!Raven.installed) {
      return next()
    }

    return Raven.requestHandler()(req, res, next)
  }
}

/**
fork icon0
star icon0
watch icon2