configureScope not working in node

I am using sentry with node and express. I’m unable to get the user to attach to my scope. My code looks like this:

app.use((req, res, next) => {
  console.log('the user',  req.user);
  if (!isEmpty(req.user)) {
    Sentry.configureScope(scope => {
      scope.setUser({ email: });

The console log does in fact print out a user but when my exceptions roll in, there is no user attached, just the default ip. Any idea what I’m doing wrong?

Hey :slight_smile:

So I saw your issue you posted on gh and Kamil already replied once, please do not open the same issue in different channels multiple times since it causes us a lot of work to sync between all of them.


The forum is a very “general” place for sentry questions, very specific questions like these are better suited for GH, so please let’s continue the discussion there.

Also for anyone else finding this, please see GH issue :slight_smile:

I hope that makes sense,