You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Kasun Eranga Kumarasinghe (JIRA)" <ji...@apache.org> on 2018/08/20 04:15:00 UTC

[jira] [Created] (OLINGO-1288) Improvements to Olingo exception messages

Kasun Eranga Kumarasinghe created OLINGO-1288:
-------------------------------------------------

             Summary: 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


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)