{"action":"created","issue":{"url":"https://api.github.com/repos/kobotoolbox/enketo-express/issues/485","repository_url":"https://api.github.com/repos/kobotoolbox/enketo-express","labels_url":"https://api.github.com/repos/kobotoolbox/enketo-express/issues/485/labels{/name}","comments_url":"https://api.github.com/repos/kobotoolbox/enketo-express/issues/485/comments","events_url":"https://api.github.com/repos/kobotoolbox/enketo-express/issues/485/events","html_url":"https://github.com/kobotoolbox/enketo-express/issues/485","id":150108247,"number":485,"title":"Show server error response message when 400 response is received","user":{"login":"MartijnR","id":627350,"avatar_url":"https://avatars.githubusercontent.com/u/627350?v=3","gravatar_id":"","url":"https://api.github.com/users/MartijnR","html_url":"https://github.com/MartijnR","followers_url":"https://api.github.com/users/MartijnR/followers","following_url":"https://api.github.com/users/MartijnR/following{/other_user}","gists_url":"https://api.github.com/users/MartijnR/gists{/gist_id}","starred_url":"https://api.github.com/users/MartijnR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MartijnR/subscriptions","organizations_url":"https://api.github.com/users/MartijnR/orgs","repos_url":"https://api.github.com/users/MartijnR/repos","events_url":"https://api.github.com/users/MartijnR/events{/privacy}","received_events_url":"https://api.github.com/users/MartijnR/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kobotoolbox/enketo-express/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/kobotoolbox/enketo-express/labels/UI","name":"UI","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-21T15:27:17Z","updated_at":"2016-04-21T16:10:15Z","closed_at":null,"body":"Check if KoBo/Ona/ODK all return a similar XML response that the message can be extracted from. This message will not be translated (unless the server does that), but will infinitely more useful to the user anyway.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/kobotoolbox/enketo-express/issues/comments/212989779","html_url":"https://github.com/kobotoolbox/enketo-express/issues/485#issuecomment-212989779","issue_url":"https://api.github.com/repos/kobotoolbox/enketo-express/issues/485","id":212989779,"user":{"login":"MartijnR","id":627350,"avatar_url":"https://avatars.githubusercontent.com/u/627350?v=3","gravatar_id":"","url":"https://api.github.com/users/MartijnR","html_url":"https://github.com/MartijnR","followers_url":"https://api.github.com/users/MartijnR/followers","following_url":"https://api.github.com/users/MartijnR/following{/other_user}","gists_url":"https://api.github.com/users/MartijnR/gists{/gist_id}","starred_url":"https://api.github.com/users/MartijnR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MartijnR/subscriptions","organizations_url":"https://api.github.com/users/MartijnR/orgs","repos_url":"https://api.github.com/users/MartijnR/repos","events_url":"https://api.github.com/users/MartijnR/events{/privacy}","received_events_url":"https://api.github.com/users/MartijnR/received_events","type":"User","site_admin":false},"created_at":"2016-04-21T16:10:15Z","updated_at":"2016-04-21T16:10:15Z","body":"I believe extracting the message may (in some cases?) is already done by Enketo in which a json response with a message property is returned. \r\n\r\nSo we may have to extract like this:\r\n1. XML Response?\r\n2. If yes, does the node /OpenRosaResponse/message exist and have a value?\r\n3. If no to 1 or 2, is JSON Response and has populated message property?\r\n4. if no to 3, use default response for HTTP400"}}