Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Created Unassigned: Set metadata url in ODataMediaTypeFormatter for ODataErrors [1174]

$
0
0
The current code for ODataMediaTypeFormatter contains the following code fragment:

```
// The MetadataDocumentUri is never required for errors. Additionally, it sometimes won't be available
// for errors, such as when routing itself fails. In that case, the route data property is not
// available on the request, and due to a bug with HttpRoute.GetVirtualPath (bug #669) we won't be able
// to generate a metadata link.
if (serializer.ODataPayloadKind != ODataPayloadKind.Error)
{
string metadataLink = urlHelper.ODataLink(new MetadataPathSegment());

if (metadataLink == null)
{
throw new SerializationException(SRResources.UnableToDetermineMetadataUrl);
}

string selectClause = GetSelectClause(Request);
writerSettings.SetMetadataDocumentUri(new Uri(metadataLink), selectClause);
}
```

The if clause is no longer necessary as issue 669 has already been fixed, and it will cause a failure when we update to ODataLib 5.6 so this change has to be made when we upgrade to ODataLib 5.6.

Viewing all articles
Browse latest Browse all 7215

Trending Articles