-
-
Notifications
You must be signed in to change notification settings - Fork 135
How to add user data to the error object in express #160
Comments
Hi @elliot-a – sorry for the slow reply. Setting context right now in an express app isn't straight forward. I'm going to look at some solutions this week. |
Hi @benvinegar, you guys giving any thoughts on this? |
@elliot-a, @vineethawal – Quick question, is it reasonable to just tell Express users, "just set |
@benvinegar sounds fine 👍 |
Hi! Is this avalaible right now? Thanks! |
@chemitaxis yes :) |
This doesn't seem to work. Looking at the code, I see the Am I missing something ? |
@surdu user is extracted from the request later down the road - Lines 129 to 155 in ea19288
I wonder if this is skipped when Lines 237 to 261 in ea19288
Can you provide a non-working example that I could use to reproduce the issue? |
I am adding user data to the req object in express as shown in this simplified example below. I am then using the dataCallback function to check to see if the user data has been added and it doesn't look like it has.
However none of that user data seems to present on 'data' object that is passed into 'dataCallback' function. It seems more like the raw request before my custom middleware has added stuff to the object.
Am I missing obvious something here, is there another way of passing user data to Sentry in express? Do you have an example anywhere?
Thanks guys!
The text was updated successfully, but these errors were encountered: