You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an OData exception occurs a stack trace of the exception is returned.
I'd like to suppress it via a configuration setting instead of relying on custom exception handling.
"Message": "The query specified in the URI is not valid. Could not find a property named 'BAD_PARAM' on type 'ODataError.WeatherForecast'.",
"ExceptionMessage": "Could not find a property named 'BAD_PARAM' on type 'ODataError.WeatherForecast'.",
"ExceptionType": "Microsoft.OData.ODataException",
"StackTrace": " at Microsoft.OData.UriParser.EndPathBinder.GeneratePropertyAccessQueryForOpenType(EndPathToken endPathToken, SingleValueNode parentNode)\n at Microsoft.OData.UriParser.EndPathBinder.BindEndPath(EndPathToken endPathToken)\n at Microsoft.OData.UriParser.MetadataBinder.BindEndPath(EndPathToken endPathToken)\n at Microsoft.OData.UriParser.MetadataBinder.Bind(QueryToken token)\n at Microsoft.OData.UriParser.BinaryOperatorBinder.GetOperandFromToken(BinaryOperatorKind operatorKind, QueryToken queryToken)\n at Microsoft.OData.UriParser.BinaryOperatorBinder.BindBinaryOperator(BinaryOperatorToken binaryOperatorToken)\n at Microsoft.OData.UriParser.MetadataBinder.BindBinaryOperator(BinaryOperatorToken binaryOperatorToken)\n at Microsoft.OData.UriParser.MetadataBinder.Bind(QueryToken token)\n at Microsoft.OData.UriParser.FilterBinder.BindFilter(QueryToken filter)\n at Microsoft.OData.UriParser.ODataQueryOptionParser.ParseFilterImplementation(String filter, ODataUriParserConfiguration configuration, ODataPathInfo odataPathInfo)\n at Microsoft.OData.UriParser.ODataQueryOptionParser.ParseFilter()\n at Microsoft.AspNetCore.OData.Query.FilterQueryOption.get_FilterClause()\n at Microsoft.AspNetCore.OData.Query.Validator.FilterQueryValidator.Validate(FilterQueryOption filterQueryOption, ODataValidationSettings settings)\n at Microsoft.AspNetCore.OData.Query.FilterQueryOption.Validate(ODataValidationSettings validationSettings)\n at Microsoft.AspNetCore.OData.Query.Validator.ODataQueryValidator.Validate(ODataQueryOptions options, ODataValidationSettings validationSettings)\n at Microsoft.AspNetCore.OData.Query.ODataQueryOptions.Validate(ODataValidationSettings validationSettings)\n at Microsoft.AspNetCore.OData.Query.EnableQueryAttribute.ValidateQuery(HttpRequest request, ODataQueryOptions queryOptions)\n at Microsoft.AspNetCore.OData.Query.EnableQueryAttribute.OnActionExecuting(ActionExecutingContext actionExecutingContext)"
}```
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
When an OData exception occurs a stack trace of the exception is returned.
I'd like to suppress it via a configuration setting instead of relying on custom exception handling.
Repo to replicate: https://github.com/avengalis/odataerror
Example:
Note the bad parameter name in the URL.
Beta Was this translation helpful? Give feedback.
All reactions