-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
"DownstreamPathTemplate": "/v2/devices/{panel-unique-id}/features",
"UpstreamPathTemplate": "/v2/devices/{panel-unique-id}/features",
Getting following error when variableplaceholder has hiphen (-)
"http://0.0.0.0:8080/v2/devices/AAAAAAAAAA/features","clientIp":"","userAgent":""}}
fail: Ocelot.Errors.Middleware.ExceptionHandlerMiddleware[0]
RequestId: 0HNFQIG1HROG4:00000001, PreviousRequestId: -
RegexParseException caught in global error handler!
DONE reporting of a total 0 inner exceptions for request 0HNFQIG1HROG4:00000001 of the original RegexParseException below ->
System.Text.RegularExpressions.RegexParseException: Invalid pattern '^^(?i)/v2/devices/(?[^&]*)/features' at offset 33. Reference to undefined group name 'unique'.
at System.Text.RegularExpressions.RegexParser.ScanGroupOpen()
at System.Text.RegularExpressions.RegexParser.ScanRegex()
at System.Text.RegularExpressions.RegexParser.Parse(String pattern, RegexOptions options, CultureInfo culture)
at System.Text.RegularExpressions.Regex..ctor(String pattern, CultureInfo culture)
at System.Text.RegularExpressions.RegexCache.GetOrAdd(String pattern)
at System.Text.RegularExpressions.Regex.Match(String input, String pattern)
at Ocelot.DownstreamRouteFinder.UrlMatcher.UrlPathPlaceholderNameAndValueFinder.FindGroups(String path, String query, String template)
at Ocelot.DownstreamRouteFinder.UrlMatcher.UrlPathPlaceholderNameAndValueFinder.Find(String path, String query, String pathTemplate)
at Ocelot.DownstreamRouteFinder.Finder.DownstreamRouteFinder.GetPlaceholderNamesAndValues(String path, String query, Route route, IDictionary2 upstreamHeaders) at Ocelot.DownstreamRouteFinder.Finder.DownstreamRouteFinder.Get(String upstreamUrlPath, String upstreamQueryString, String httpMethod, IInternalConfiguration configuration, String upstreamHost, IDictionary2 upstreamHeaders)
at Ocelot.DownstreamRouteFinder.Middleware.DownstreamRouteFinderMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.MiddlewareAnalysis.AnalysisMiddleware.Invoke(HttpContext httpContext)
at Ocelot.Responder.Middleware.ResponderMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.MiddlewareAnalysis.AnalysisMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.MiddlewareAnalysis.AnalysisMiddleware.Invoke(HttpContext httpContext)
at Ocelot.Errors.Middleware.ExceptionHandlerMiddleware.Invoke(HttpContext context)