You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "mibo (Jira)" <ji...@apache.org> on 2021/01/06 11:44:02 UTC
[jira] [Updated] (OLINGO-1372) Error response is always coming in
"application/json" format if url has the query parameters in it
[ https://issues.apache.org/jira/browse/OLINGO-1372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
mibo updated OLINGO-1372:
-------------------------
Fix Version/s: (was: (Java) V4 4.8.0)
(Java) V4 4.9.0
> Error response is always coming in "application/json" format if url has the query parameters in it
> --------------------------------------------------------------------------------------------------
>
> Key: OLINGO-1372
> URL: https://issues.apache.org/jira/browse/OLINGO-1372
> Project: Olingo
> Issue Type: Bug
> Components: odata2-core, odata4-server
> Affects Versions: (Java) V4 4.5.0, (Java) V4 4.6.0
> Environment: windows 10 - 64 bit operating system
> using java jdk 1.8.192
> Reporter: Venkateswara Raju Chodraju
> Priority: Blocker
> Fix For: (Java) V4 4.9.0
>
>
> If we make an odata api call with query parameters included (for example *?$top=2*) as per the uri specification in odata documentation ([https://www.odata.org/documentation/odata-version-2-0/uri-conventions/]) with content type as "*application/xml"* in headers then the response object is coming in "application/xml" format which is expected but If there any error by any case then the error response format is always coming in "*application/json*" format instead of "*application/xml*".
> The expected error response format should always match the requested content type which is "*application/xml*" in my case.
>
> for example :
> *Current Error Response with Content Type = application/xml and Accept = application/xml*
> {
> "error": {
> "code": null,
> "message": "Cannot find EntitySet, Singleton, ActionImport or FunctionImport with name 'XXXXXX'."
> }
> }
> Expected Response should be :
> Expected Result:
> <error xmlns="http://docs.oasis-open.org/odata/ns/metadata">
> <code>null</code>
> <message>
> Cannot find EntitySet, Singleton, ActionImport or FunctionImport with name 'XXXXXX'.
> </message>
> </error>
> Please kindly look into this issue as it is blocking my release.
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)