[ https://issues.apache.org/jira/browse/OLINGO-1372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
mibo updated OLINGO-1372: ------------------------- Fix Version/s: Version (Java) V4 5.0.0 (was: (Java) V4 4.10.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: Version (Java) V4 5.0.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.20.10#820010)