|
@@ -54,7 +54,8 @@ public class ExportDataController : BaseController
|
|
|
.Where(endpoint => endpoint.RoutePattern.RawText == originalPath)
|
|
|
.ToList()
|
|
|
?? throw UserFriendlyException.SameMessage($"根据URL查询路由失败: {originalPath}");
|
|
|
- var matchingEndpoint = matchingEndpoints.First();
|
|
|
+ var matchingEndpoint = matchingEndpoints.FirstOrDefault();
|
|
|
+ if (matchingEndpoint == null) throw UserFriendlyException.SameMessage($"根据URL查询路由失败: {originalPath}");
|
|
|
if (matchingEndpoints.Count > 1)
|
|
|
{
|
|
|
matchingEndpoint = matchingEndpoints.First(m => m.DisplayName.Contains("Get"));
|