[ 
https://issues.apache.org/jira/browse/UNOMI-211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16697632#comment-16697632
 ] 

Michael Ghen commented on UNOMI-211:
------------------------------------

I could probably handle this is someone could point me to the place where this 
might be implemented

> Logging for "Failed to Parse" ElasticSearch errors
> --------------------------------------------------
>
>                 Key: UNOMI-211
>                 URL: https://issues.apache.org/jira/browse/UNOMI-211
>             Project: Apache Unomi
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.3.0-incubating
>            Reporter: Michael Ghen
>            Priority: Major
>
> I have been noticing a lot of 204 errors which tend to mean something failed. 
> This is one of those issues and I think many people might stumble onto this 
> and get confused. 
> The problem happens when some invalid JSON is created that Elasticsearch does 
> not like. In this case, I have a key value pair in the properties of a 
> profile that looks like:
> {code:java}
> {
> "itemId": "f283309c-9bdc-11e8-9127-0a58ac100323",
> "itemType": "profile",
> "properties": {
>   "firstName": "Mike",
>   "lastName": "Ghen",
>   "": ""  # Something invalid that a programming language may form
> },
> "systemProperties": {},
> "segments": [],
> "scores": {},
> "consents": {}
> }{code}
> When posted to update a profile with the `"": ""` key value, you'll get a 204 
> error. 
> While this might be a silly ES error, I would expect Unomi to return such in 
> the reponse. The 204 response code is not documented. 
> The expected result should be a 415 error code and even better if the error 
> came back in the reponse. When I looked into the Unomi logs I found this 
> error:
> {code:java}
> Caused by: java.lang.IllegalArgumentException: object field starting or 
> ending with a [.] makes object resolution ambiguous: []
> {code}
> Which helped me trace the error down in my profile (which has 200 key value 
> pairs).
> It would be ideal if Unomi could return this "Caused by" error message and a 
> 415 for situations like this.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to