How do we debug an 'Invalid OData URL' error from the Indicium log?

  • 28 October 2022
  • 2 replies

Userlevel 6
Badge +10

On our Production environment we have the following error popping up in our Indicium logs once in a while. This is caused by an action of an end user, we presume. But how can we debug this error (based on Production logs - without using Debug mode)? I don't see any pointers in the below error message:

[Error] Indicium.OData.ODataRouteValueTransformer: Invalid OData URL. Microsoft.OData.ODataException: Bad Request - Error in query syntax.
at Microsoft.OData.UriParser.ODataUriResolver.ResolveKeys(IEdmEntityType type, IDictionary2 namedValues, Func3 convertFunc)
at Microsoft.OData.UriParser.AlternateKeysODataUriResolver.ResolveKeys(IEdmEntityType type, IDictionary2 namedValues, Func3 convertFunc)
at Microsoft.OData.UriParser.SegmentArgumentParser.TryConvertValues(IEdmEntityType targetEntityType, IEnumerable1& keyPairs, ODataUriResolver resolver) at Microsoft.OData.UriParser.SegmentKeyHandler.CreateKeySegment(ODataPathSegment segment, KeySegment previousKeySegment, SegmentArgumentParser key, ODataUriResolver resolver) at Microsoft.OData.UriParser.SegmentKeyHandler.TryCreateKeySegmentFromParentheses(ODataPathSegment previous, KeySegment previousKeySegment, String parenthesisExpression, ODataUriResolver resolver, ODataPathSegment& keySegment, Boolean enableUriTemplateParsing) at Microsoft.OData.UriParser.ODataPathParser.TryBindKeyFromParentheses(String parenthesesSection) at Microsoft.OData.UriParser.ODataPathParser.TryCreateSegmentForNavigationSource(String identifier, String parenthesisExpression) at Microsoft.OData.UriParser.ODataPathParser.CreateFirstSegment(String segmentText) at Microsoft.OData.UriParser.ODataPathParser.ParsePath(ICollection1 segments)
at Microsoft.OData.UriParser.ODataPathFactory.BindPath(ICollection`1 segments, ODataUriParserConfiguration configuration)
at Microsoft.OData.UriParser.ODataUriParser.Initialize()
at Indicium.OData.ODataRouteValueTransformer.TransformAsync(HttpContext httpContext, RouteValueDictionary values) in C:\azp\agent_work\1\s\src\Indicium\OData\ODataRouteValueTransformer.cs:line 204



Best answer by Dick van den Brink 28 October 2022, 13:50

View original

This topic has been closed for comments

2 replies

Userlevel 4
Badge +2

In the next version of Indicium when used with CloudWatch you can see the RequestPath to make this more clear. Like in the image below as an example - (note this is a different error but the structure will be the same).


That being said, we will also try to make the log message clearer when CloudWatch or Application Insights is not used.

Userlevel 6
Badge +10

@Dick van den Brink to clarify: so currently there is no way to debug this specific error as long as the reproduction steps are unknown?