You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Users consist of a few key pieces of information which are used to construct a unique identity in Sentry. Each of these is optional, but one must be present in order for the user to be captured.
Although I could create a SentryUser using init the SDK though effective forces supplying a userId because the serialize method will attempt to capture the value of the userId property which would be nil and cause a crash.
In my particular case I don't have the userId available, only the username. Ideally the SDK would match the constraints/requirements of the Sentry API.
The text was updated successfully, but these errors were encountered:
Hi Daniel. Thanks for working on this so quickly. Just a thought. Since the Sentry API expects that one of the fields be present do you think there should be some kind of error or (eek) exception thrown if attempting to serialize a SentryUser without at least one value set? Or maybe even simply returning nil. I haven't dug deep into the SDK code to know the implications though.
Platform:
Swift:
sentry-cocoa installed with:
Version of sentry-cocoa:
3.4.3
SentryUser forces use of optional userId property
The Sentry documentation for capturing the user states:
Although I could create a SentryUser using
init
the SDK though effective forces supplying a userId because the serialize method will attempt to capture the value of the userId property which would be nil and cause a crash.In my particular case I don't have the userId available, only the username. Ideally the SDK would match the constraints/requirements of the Sentry API.
The text was updated successfully, but these errors were encountered: