Skip to content

Local variables not recorded when they are falsey #10815

@malwilley

Description

@malwilley

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/node

SDK Version

@sentry/node 7.102.1

Framework Version

No response

Link to Sentry event

https://malachi-test-org.sentry.io/issues/5014108873/events/0d17eeb428a84cd18ce6f7d153c17898/

SDK Setup

No response

Steps to Reproduce

  1. Setup node app with Sentry and includeLocalVariables: true
  2. Add local variables and capture exception

Expected Result

I should see all my local variables regardless of value.

Actual Result

Only variables with truthy values are shown (in event JSON and UI):

CleanShot 2024-02-26 at 10 51 28

CleanShot 2024-02-26 at 10 50 31

Might be due to the code here?

} else if (prop?.value?.value || prop?.value?.description) {

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions