Skip to content

Commit edb4d74

Browse files
committed
Ignore null values when setting tag on CocoaScopeObserver
1 parent d197cb2 commit edb4d74

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Sentry/Platforms/Cocoa/CocoaScopeObserver.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ public void SetExtra(string key, object? value)
6767

6868
public void SetTag(string key, string value)
6969
{
70+
if (value is null)
71+
{
72+
_options.LogDebug("Tag with key '{0}' was null.", key);
73+
return;
74+
}
75+
7076
try
7177
{
7278
SentryCocoaSdk.ConfigureScope(scope => scope.SetTagValue(value, key));

0 commit comments

Comments
 (0)