HTTP/1.1 500 Expected string. Got START_OBJECT

606 views
Skip to first unread message

dhan

unread,
May 16, 2016, 8:56:34 AM5/16/16
to Kaa project
Hi Team,

I am getting the below error when running the web service to send notification. Also, please find the logs attached.

" HTTP/1.1 500 Expected string. Got START_OBJECT"

I have the notification.json file having the below content as mentioned in the documentation.

{"message":{"string":"Hello world!"}}

Regards,
Dhan
kaa-node.log

Oleksandr

unread,
May 31, 2016, 4:54:33 AM5/31/16
to Kaa project
Hi!

This question is similar to your another thread.
As I see from provided log file, field "message" is not optional in your notification schema, that's why it represented as primitive data type string. If you mark field as optional it will be represented as complex data type Union. That's why your notification.json file should contain
{
"message": "Hello world!"
}
instead of intended for Union type
{
  "message":{
    "string":"Hello world!"
  }
}
I have added more detailed description for send notification methods in our Admin REST API documentation page.

Best regards,
Oleksandr

понеділок, 16 травня 2016 р. 15:56:34 UTC+3 користувач dhan написав:
Reply all
Reply to author
Forward
0 new messages