OData / OData/AspNetCoreOData

KeySegmentTemplate.TryTranslate Throws Unhandleable Exception

Open
#464 12 comments 1 reaction 1 assignee View on GitHub

@corranrogue9 is already working on this.

Since Feb 1, 2022.

investigating
Dominant language
C#
Stars
505
Forks
186
PR merge metrics
No merged PRs in 30d

Description

https://github.com/OData/AspNetCoreOData/blob/4721f7aa9b84ba5c2ff914fa4ca860d146b87534/src/Microsoft.AspNetCore.OData/Routing/Template/KeySegmentTemplate.cs#L152

When routing Odata Request, an exception is thrown (the full exception is provided at the end of the issue)

this exception casuses an immediate 500 response (no layer can runs before the routing)

the URI that causes the issue: http://localhost:1059/api/students/$filter=status eq 'New'
the URI is almost valid (missing the question mark for the query)

My guess is That ODataUriUtils.ConvertFromUriLiteral Doesn't handle the above URI well...

the full exception in the first comment

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.