{"action":"created","issue":{"url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/1947","repository_url":"https://api.github.com/repos/telefonicaid/fiware-orion","labels_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/1947/labels{/name}","comments_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/1947/comments","events_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/1947/events","html_url":"https://github.com/telefonicaid/fiware-orion/issues/1947","id":142946299,"number":1947,"title":"[BUG] in POST v2/subscriptions if expression is different to a json object CB is stopped","user":{"login":"iariasleon","id":4330098,"avatar_url":"https://avatars.githubusercontent.com/u/4330098?v=3","gravatar_id":"","url":"https://api.github.com/users/iariasleon","html_url":"https://github.com/iariasleon","followers_url":"https://api.github.com/users/iariasleon/followers","following_url":"https://api.github.com/users/iariasleon/following{/other_user}","gists_url":"https://api.github.com/users/iariasleon/gists{/gist_id}","starred_url":"https://api.github.com/users/iariasleon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iariasleon/subscriptions","organizations_url":"https://api.github.com/users/iariasleon/orgs","repos_url":"https://api.github.com/users/iariasleon/repos","events_url":"https://api.github.com/users/iariasleon/events{/privacy}","received_events_url":"https://api.github.com/users/iariasleon/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/telefonicaid/fiware-orion/labels/APIv2","name":"APIv2","color":"5319e7"},{"url":"https://api.github.com/repos/telefonicaid/fiware-orion/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/telefonicaid/fiware-orion/labels/P8","name":"P8","color":"fbca04"}],"state":"closed","locked":false,"assignee":{"login":"iariasleon","id":4330098,"avatar_url":"https://avatars.githubusercontent.com/u/4330098?v=3","gravatar_id":"","url":"https://api.github.com/users/iariasleon","html_url":"https://github.com/iariasleon","followers_url":"https://api.github.com/users/iariasleon/followers","following_url":"https://api.github.com/users/iariasleon/following{/other_user}","gists_url":"https://api.github.com/users/iariasleon/gists{/gist_id}","starred_url":"https://api.github.com/users/iariasleon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iariasleon/subscriptions","organizations_url":"https://api.github.com/users/iariasleon/orgs","repos_url":"https://api.github.com/users/iariasleon/repos","events_url":"https://api.github.com/users/iariasleon/events{/privacy}","received_events_url":"https://api.github.com/users/iariasleon/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/telefonicaid/fiware-orion/milestones/25","html_url":"https://github.com/telefonicaid/fiware-orion/milestones/1.1.0","labels_url":"https://api.github.com/repos/telefonicaid/fiware-orion/milestones/25/labels","id":1562952,"number":25,"title":"1.1.0","description":"","creator":{"login":"fgalan","id":1534240,"avatar_url":"https://avatars.githubusercontent.com/u/1534240?v=3","gravatar_id":"","url":"https://api.github.com/users/fgalan","html_url":"https://github.com/fgalan","followers_url":"https://api.github.com/users/fgalan/followers","following_url":"https://api.github.com/users/fgalan/following{/other_user}","gists_url":"https://api.github.com/users/fgalan/gists{/gist_id}","starred_url":"https://api.github.com/users/fgalan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fgalan/subscriptions","organizations_url":"https://api.github.com/users/fgalan/orgs","repos_url":"https://api.github.com/users/fgalan/repos","events_url":"https://api.github.com/users/fgalan/events{/privacy}","received_events_url":"https://api.github.com/users/fgalan/received_events","type":"User","site_admin":false},"open_issues":41,"closed_issues":4,"state":"open","created_at":"2016-02-04T10:19:06Z","updated_at":"2016-04-04T12:21:17Z","due_on":"2016-04-29T22:00:00Z","closed_at":null},"comments":5,"created_at":"2016-03-23T12:23:18Z","updated_at":"2016-04-04T12:21:17Z","closed_at":"2016-04-04T12:21:17Z","body":" in POST v2/subscriptions. if expression is not a JSON object, the CB crashes.\r\n\r\n#### Subscription request\r\n```\r\nhttp://localhost:1026/v2/subscriptions/\r\nFiware-Service: test_update_happy_path\r\nFiware-ServicePath: /test\r\nContent-Type: application/json\r\n {\r\n \t\"notification\": {\r\n \t\t\"callback\": \"http://localhost:1234\",\r\n \t\t\"throttling\": 5,\r\n \t\t\"attributes\": [\"temperature_0\", \"temperature_1\", \"temperature_2\"]\r\n \t},\r\n \t\"expires\": \"2016-04-05T14:00:00.00Z\",\r\n \t\"description\": \"my first subscription\",\r\n \t\"subject\": {\r\n \t\t\"entities\": [{\r\n \t\t\t\"type\": \"room_0\",\r\n \t\t\t\"id\": \"room2\"\r\n \t\t}],\r\n \t\t\"condition\": {\r\n \t\t\t\"attributes\": [\"temperature_0\", \"temperature_1\", \"temperature_2\"],\r\n          \"expression\": \"q=temperature>40\"\r\n \t\t}\r\n \t}\r\n }\r\n```\r\n\r\n#### CB log message\r\n```\r\ncontextBroker: /usr/local/include/rapidjson/document.h:858: typename rapidjson::GenericMemberIterator<true, Encoding, Allocator>::Iterator rapidjson::GenericValue<Encoding, Allocator>::MemberEnd() const [with Encoding = rapidjson::UTF8<char>, Allocator = rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>]: Assertion `IsObject()' failed.\r\n```"},"comment":{"url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/comments/205272934","html_url":"https://github.com/telefonicaid/fiware-orion/issues/1947#issuecomment-205272934","issue_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/1947","id":205272934,"user":{"login":"iariasleon","id":4330098,"avatar_url":"https://avatars.githubusercontent.com/u/4330098?v=3","gravatar_id":"","url":"https://api.github.com/users/iariasleon","html_url":"https://github.com/iariasleon","followers_url":"https://api.github.com/users/iariasleon/followers","following_url":"https://api.github.com/users/iariasleon/following{/other_user}","gists_url":"https://api.github.com/users/iariasleon/gists{/gist_id}","starred_url":"https://api.github.com/users/iariasleon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iariasleon/subscriptions","organizations_url":"https://api.github.com/users/iariasleon/orgs","repos_url":"https://api.github.com/users/iariasleon/repos","events_url":"https://api.github.com/users/iariasleon/events{/privacy}","received_events_url":"https://api.github.com/users/iariasleon/received_events","type":"User","site_admin":false},"created_at":"2016-04-04T12:21:17Z","updated_at":"2016-04-04T12:21:17Z","body":"LGTM \r\n```\r\nStatus:400: Bad Request\r\nConnection: Keep-Alive\r\nContent-Length: 66\r\nContent-Type: application/json\r\nDate: Mon, 04 Apr 2016 12:20:18 GMT\r\n{\r\n\"error\": \"BadRequest\"\r\n\"description\": \"expression is not an object\"\r\n}\r\n```"}}