{"action":"created","issue":{"url":"https://api.github.com/repos/histograph/api/issues/33","labels_url":"https://api.github.com/repos/histograph/api/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/histograph/api/issues/33/comments","events_url":"https://api.github.com/repos/histograph/api/issues/33/events","html_url":"https://github.com/histograph/api/issues/33","id":76307872,"number":33,"title":"POST to /source/pits results in an ugly error on screen","user":{"login":"phpetra","id":2119144,"avatar_url":"https://avatars.githubusercontent.com/u/2119144?v=3","gravatar_id":"","url":"https://api.github.com/users/phpetra","html_url":"https://github.com/phpetra","followers_url":"https://api.github.com/users/phpetra/followers","following_url":"https://api.github.com/users/phpetra/following{/other_user}","gists_url":"https://api.github.com/users/phpetra/gists{/gist_id}","starred_url":"https://api.github.com/users/phpetra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phpetra/subscriptions","organizations_url":"https://api.github.com/users/phpetra/orgs","repos_url":"https://api.github.com/users/phpetra/repos","events_url":"https://api.github.com/users/phpetra/events{/privacy}","received_events_url":"https://api.github.com/users/phpetra/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-05-14T10:09:20Z","updated_at":"2015-05-14T10:31:52Z","closed_at":null,"body":"Call to the API:\r\nPOST /sources/carnaval/pits HTTP/1.1 Host: api.histograph.io Content-type: application/json Mime-type: application/x-ndjson Authorization: Basic aGlzdG9ncmFwaDpnM2gzMW1wNDU1 Accept: application/json User-Agent: Guzzle/5.2.0 curl/7.35.0 PHP/5.5.9-1ubuntu4.7 Content-Length: 30756 {\"id\":\"carnaval\\/1\",\"name\":\"'t Aogje\",\"type\":\"hg:Place\",\"hasBeginning\":\"2000-01-01\",\"hasEnd\":\"2000-01-01\"} {\"id\":\"carnaval\\/2\",\"name\":\"'t Bliekersriek\",\"type\":\"hg:Place\",\"hasBeginning\":\"2000-01-01\",\"hasEnd\":\"2000-01-01\"} {\"id\":\"carnaval\\/3\",\"name\":\"'t Bokkerijersrijk\",\"type\":\"hg:Place\",\"hasBeginning\":\"2000-01-01\",\"hasEnd\":\"2000-01-01\"} {\"id\":\"carnaval\\/4\",\"name\":\"'t Ganzedrp\",\"type\":\"hg:Place\",\"hasBeginning\":\"2000-01-01\",\"hasEnd\":\"2000-01-01\"} {\"id\":\"carnaval\\/5\",\"name\":\"'t Heidurp\",\"type\":\"hg:Place\",\"hasBeginning\":\"2000-01-01\",\"hasEnd\":\"2000-01-01\"} {\"id\":\"carnaval\\/6\",\"name\":\"'t Hout\",\"type\":\"hg:Place\",\"hasBeginning\":\"2000-01-01\",\"hasEnd\":\"2000-01-01\"} {\"id\":\"carnaval\\/7\",\"name\":\"'t Hupke\",\"type\":\"hg:Place\",\"hasBeginning\":\"2000-01-01\",\"hasEnd\":\"2000-01-01\"} {\"id\":\"carnaval\\/8\",\"name\":\"'t Kleigat\",\"type\":\"hg:Place\",\"hasBeginning\":\"2000-01-01\",\"hasEnd\":\"2000-01-01\"} {\"id\":\"carnaval\\/9\",\"name\":\"'t Nlersriek\",\"type\":\"hg:Place\",\"hasBeginning\":\"2000-01-01\",\"hasEnd\":\"2000-01-01\"} {\"id\":\"carnaval\\/10\",\"name\":\"'t Sanegat\",\"type\":\"hg:Place\",\"hasBeginning\":\"2000-01-01\",\"hasEnd\":\"2000-01-01\"} {\"id\":\"carnaval\\/11\",\"name\":\"'t Ulenest\",\"type\":\"hg:Place\",\"hasBeginning\":\"2000-01-01\",\"hasEnd\":\"2000-01-01\"} {\"id\":\"carnaval\\/12\",\"name\":\"'t Verkesriek\",\"type\":\"hg:Place\",\"hasBeginning\":\"2000-01-01\",\"hasEnd\":\"2000-01-01\"} {\"id\":\"carnaval\\/13\",\"name\":\"'t Vosse'ol\",\"type\":\"hg:Place\",\"hasBeginning\":\"2000-01-01\",\"hasEnd\":\"2000-01-01\"} {\"id\":\"carnaval\\/14\",\"name\":\"'t Zelfkantriek\",\"type\":\"hg:Place\",\"hasBeginning\":\"2000-01-01\",\"hasEnd\":\"2000-01-01\"} \r\n    ...........truncated\r\n\r\n\r\nResponse is an ugly error:\r\nHTTP/1.1 400 Bad Request Server: nginx/1.2.1 Date: Thu, 14 May 2015 10:01:42 GMT Content-Type: text/html; charset=utf-8 Content-Length: 600 Connection: keep-alive X-Powered-By: Express Access-Control-Allow-Origin: * Vary: Origin X-Content-Type-Options: nosniff SyntaxError: Unexpected token {\r\n   at Object.parse (native)\r\n   at parse (/opt/histograph/io/node_modules/body-parser/lib/types/json.js:84:17)\r\n   at /opt/histograph/io/node_modules/body-parser/lib/read.js:102:18\r\n   at IncomingMessage.onEnd (/opt/histograph/io/node_modules/body-parser/node_modules/raw-body/index.js:136:7)\r\n   at IncomingMessage.g (events.js:180:16)\r\n   at IncomingMessage.emit (events.js:92:17)\r\n   at _stream_readable.js:944:16\r\n   at process._tickCallback (node.js:448:13) \r\n"},"comment":{"url":"https://api.github.com/repos/histograph/api/issues/comments/101997702","html_url":"https://github.com/histograph/api/issues/33#issuecomment-101997702","issue_url":"https://api.github.com/repos/histograph/api/issues/33","id":101997702,"user":{"login":"phpetra","id":2119144,"avatar_url":"https://avatars.githubusercontent.com/u/2119144?v=3","gravatar_id":"","url":"https://api.github.com/users/phpetra","html_url":"https://github.com/phpetra","followers_url":"https://api.github.com/users/phpetra/followers","following_url":"https://api.github.com/users/phpetra/following{/other_user}","gists_url":"https://api.github.com/users/phpetra/gists{/gist_id}","starred_url":"https://api.github.com/users/phpetra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phpetra/subscriptions","organizations_url":"https://api.github.com/users/phpetra/orgs","repos_url":"https://api.github.com/users/phpetra/repos","events_url":"https://api.github.com/users/phpetra/events{/privacy}","received_events_url":"https://api.github.com/users/phpetra/received_events","type":"User","site_admin":false},"created_at":"2015-05-14T10:31:52Z","updated_at":"2015-05-14T10:31:52Z","body":"Hetzelfde eigenlijk, een parse error:\r\n\r\nPUT /sources/carnaval/pits HTTP/1.1 Host: api.histograph.io Content-type: application/json Mime-type: application/x-ndjson Authorization: Basic aGlzdG9ncmFwaDpnM2gzMW1wNDU1 Accept: application/json User-Agent: Guzzle/5.2.0 curl/7.35.0 PHP/5.5.9-1ubuntu4.7 Content-Length: 1136 {\"id\":\"carnaval\\/264\",\"name\":\"Zaandhaozenlaand\",\"type\":\"hg:Place\",\"hasBeginning\":\"2000-01-01\",\"hasEnd\":\"2000-01-01\"} {\"id\":\"carnaval\\/265\",\"name\":\"Zaantaozelaant\",\"type\":\"hg:Place\",\"hasBeginning\":\"2000-01-01\",\"hasEnd\":\"2000-01-01\"} {\"id\":\"carnaval\\/266\",\"name\":\"Zandhazendurp\",\"type\":\"hg:Place\",\"hasBeginning\":\"2000-01-01\",\"hasEnd\":\"2000-01-01\"} {\"id\":\"carnaval\\/267\",\"name\":\"Zandkruiersland\",\"type\":\"hg:Place\",\"hasBeginning\":\"2000-01-01\",\"hasEnd\":\"2000-01-01\"} {\"id\":\"carnaval\\/268\",\"name\":\"Zandkruiersland\",\"type\":\"hg:Place\",\"hasBeginning\":\"2000-01-01\",\"hasEnd\":\"2000-01-01\"} {\"id\":\"carnaval\\/269\",\"name\":\"Zeikmeikenrijk\",\"type\":\"hg:Place\",\"hasBeginning\":\"2000-01-01\",\"hasEnd\":\"2000-01-01\"} {\"id\":\"carnaval\\/270\",\"name\":\"Zeuvebultelaand\",\"type\":\"hg:Place\",\"hasBeginning\":\"2000-01-01\",\"hasEnd\":\"2000-01-01\"} {\"id\":\"carnaval\\/271\",\"name\":\"Zwaajgat\",\"type\":\"hg:Place\",\"hasBeginning\":\"2000-01-01\",\"hasEnd\":\"2000-01-01\"} {\"id\":\"carnaval\\/272\",\"name\":\"Zwammegat\",\"type\":\"hg:Place\",\"hasBeginning\":\"2000-01-01\",\"hasEnd\":\"2000-01-01\"} {\"id\":\"carnaval\\/273\",\"name\":\"Zwetsgat\",\"type\":\"hg:Place\",\"hasBeginning\":\"2000-01-01\",\"hasEnd\":\"2000-01-01\"}\r\n\r\n\r\nHTTP/1.1 400 Bad Request Server: nginx/1.2.1 Date: Thu, 14 May 2015 10:31:13 GMT Content-Type: text/html; charset=utf-8 Content-Length: 600 Connection: keep-alive X-Powered-By: Express Access-Control-Allow-Origin: * Vary: Origin X-Content-Type-Options: nosniff SyntaxError: Unexpected token {\r\n   at Object.parse (native)\r\n   at parse (/opt/histograph/io/node_modules/body-parser/lib/types/json.js:84:17)\r\n   at /opt/histograph/io/node_modules/body-parser/lib/read.js:102:18\r\n   at IncomingMessage.onEnd (/opt/histograph/io/node_modules/body-parser/node_modules/raw-body/index.js:136:7)\r\n   at IncomingMessage.g (events.js:180:16)\r\n   at IncomingMessage.emit (events.js:92:17)\r\n   at _stream_readable.js:944:16\r\n   at process._tickCallback (node.js:448:13) We are sorry, but something went terribly wrong. Error Message: Unable to parse JSON data: JSON_ERROR_SYNTAX - Syntax error, malformed JSON"}}