[ https://issues.apache.org/jira/browse/OLINGO-1288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16585800#comment-16585800 ]
Kasun Eranga Kumarasinghe commented on OLINGO-1288: --------------------------------------------------- Patch is attached. > Improvements to Olingo exception messages > ----------------------------------------- > > Key: OLINGO-1288 > URL: https://issues.apache.org/jira/browse/OLINGO-1288 > Project: Olingo > Issue Type: Improvement > Components: odata4-server > Affects Versions: (Java) V4 4.4.0 > Reporter: Kasun Eranga Kumarasinghe > Priority: Minor > Attachments: OLINGO-1288.patch > > > Some Exception messages provided by Olingo are not that helpful when it comes > to debugging. > For example consider a scenario where an incompatible data value is used in > $filter system query option as follows. > [http://localhost:8080/odata-server-tecsvc-4.6.0-SNAPSHOT/odata.svc/ESAllPrim?$filter=PropertyInt16%20eq%20%2732767%27&$format=application/json] > > For this request, the response is like this: "The types 'Edm.Int16' and > 'Edm.String' are not compatible." > This exception message doesn't indicate for which property in odata object > the data type incompatibility has occurred. > So if the request is more complex, then finding the exact mistake is very > hard. > Error response such as following would be more appropriate in this scenario. > "Incompatible type for property 'PropertyInt16' in data object > 'olingo.odata.test1.ETAllPrim'. Expected: 'Edm.Int16' Actual: 'Edm.String'." -- This message was sent by Atlassian JIRA (v7.6.3#76005)