Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#if !NETFRAMEWORK

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Threading;
using Datadog.Trace.AppSec;
Expand Down Expand Up @@ -84,7 +85,20 @@ private static void GatherEndpoints(IKestrelServer kestrelServer)
return;
}

AppSec.EndpointsCollection.CollectEndpoints(endpointDataSource.Endpoints);
IReadOnlyList<object> endpoints;

try
{
endpoints = endpointDataSource.Endpoints;
}
catch (Exception ex)
{
// Evaluating this property runs third-party code, so a failure here isn't a tracer defect
Log.Warning(ex, "API Security: Endpoints collection: Failed to evaluate the EndpointDataSource endpoints.");
return;
}

AppSec.EndpointsCollection.CollectEndpoints(endpoints);
}
}

Expand Down
Loading