[
https://issues.apache.org/jira/browse/OLINGO-903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15196795#comment-15196795
]
Michael Bolz commented on OLINGO-903:
-------------------------------------
Hi [[email protected]],
The problem with this issue is that exceptions like
{{UriParserSemanticException}} will stop the parsing of the URL.
Hence the odata query option {{$format}} is not parsed and for processing in
the {{ODataHandler}} not available.
I will check which behavior would be be best for such cases (in respect to the
OData specification) and give feedback.
As example the an odata.org sample service would return the error response in
json, see:
http://services.odata.org/V4/Northwind/Northwind.svc/Customersss?$format=json
Best Regards, Michael
> ?$format=json does not work when entity or collection is nonexistent
> --------------------------------------------------------------------
>
> Key: OLINGO-903
> URL: https://issues.apache.org/jira/browse/OLINGO-903
> Project: Olingo
> Issue Type: Bug
> Components: odata4-server
> Affects Versions: (Java) V4 4.1.0
> Reporter: Anirban Das
> Assignee: Michael Bolz
> Priority: Minor
>
> ArtSalesOrder/0.0.1-SNAPSHOT/CustomerNonExixtent?$format=json
>
> Regarding the above query the Entity ‘CustomerNonExixtent’ does not exist .
> But while returning the response it is arriving in xml format even though we
> request json format. On debugging we found that the uriInfo object creation
> results in an exception during queries like this, hence the ContentNegotiator
> switches to the default xml format. Is this behavior expected ?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)