We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6b8d61b commit b03bf16Copy full SHA for b03bf16
tracer/src/Datadog.Trace/AppSec/Coordinator/SecurityCoordinator.Core.cs
@@ -170,13 +170,19 @@ internal override int? StatusCode
170
{
171
get
172
173
+ if (IsAdditiveContextDisposed())
174
+ {
175
+ return null;
176
+ }
177
+
178
try
179
180
return Context.Response.StatusCode;
181
}
182
catch (Exception e) when (e is NullReferenceException or ObjectDisposedException)
183
184
Log.Debug(e, "Exception while trying to access StatusCode of a Context.Response.");
185
+ SetAdditiveContextDisposed(true);
186
return null;
187
188
0 commit comments