{"action":"created","issue":{"url":"https://api.github.com/repos/USGS-R/sbtools/issues/22","labels_url":"https://api.github.com/repos/USGS-R/sbtools/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/USGS-R/sbtools/issues/22/comments","events_url":"https://api.github.com/repos/USGS-R/sbtools/issues/22/events","html_url":"https://github.com/USGS-R/sbtools/issues/22","id":54193631,"number":22,"title":"handle json parsing errors elegantly?","user":{"login":"jread-usgs","id":2349007,"avatar_url":"https://avatars.githubusercontent.com/u/2349007?v=3","gravatar_id":"","url":"https://api.github.com/users/jread-usgs","html_url":"https://github.com/jread-usgs","followers_url":"https://api.github.com/users/jread-usgs/followers","following_url":"https://api.github.com/users/jread-usgs/following{/other_user}","gists_url":"https://api.github.com/users/jread-usgs/gists{/gist_id}","starred_url":"https://api.github.com/users/jread-usgs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jread-usgs/subscriptions","organizations_url":"https://api.github.com/users/jread-usgs/orgs","repos_url":"https://api.github.com/users/jread-usgs/repos","events_url":"https://api.github.com/users/jread-usgs/events{/privacy}","received_events_url":"https://api.github.com/users/jread-usgs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-01-13T13:30:53Z","updated_at":"2015-01-13T15:50:20Z","closed_at":null,"body":"`Error in parseJSON(txt) : parse error: premature EOF\r\n                                       {\"total\":1,\"selflink\":{\"rel\":\"s\r\n                     (right here) ------^ `"},"comment":{"url":"https://api.github.com/repos/USGS-R/sbtools/issues/comments/69765430","html_url":"https://github.com/USGS-R/sbtools/issues/22#issuecomment-69765430","issue_url":"https://api.github.com/repos/USGS-R/sbtools/issues/22","id":69765430,"user":{"login":"jread-usgs","id":2349007,"avatar_url":"https://avatars.githubusercontent.com/u/2349007?v=3","gravatar_id":"","url":"https://api.github.com/users/jread-usgs","html_url":"https://github.com/jread-usgs","followers_url":"https://api.github.com/users/jread-usgs/followers","following_url":"https://api.github.com/users/jread-usgs/following{/other_user}","gists_url":"https://api.github.com/users/jread-usgs/gists{/gist_id}","starred_url":"https://api.github.com/users/jread-usgs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jread-usgs/subscriptions","organizations_url":"https://api.github.com/users/jread-usgs/orgs","repos_url":"https://api.github.com/users/jread-usgs/repos","events_url":"https://api.github.com/users/jread-usgs/events{/privacy}","received_events_url":"https://api.github.com/users/jread-usgs/received_events","type":"User","site_admin":false},"created_at":"2015-01-13T15:50:20Z","updated_at":"2015-01-13T15:50:20Z","body":"Here is the full trace:\r\n\r\n```\r\nError in parseJSON(txt) : lexical error: invalid char in json text.\r\n          22site_root                     %7D\"},\"items\":[<!DOCTYPE html PUBLIC \"-//W3C//\r\n                     (right here) ------^ \r\n9 parseJSON(txt) \r\n8 fromJSON_string(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, \r\n    simplifyMatrix = simplifyMatrix, flatten = flatten, ...) \r\n7 jsonlite::fromJSON(parse_text(x, encoding = \"UTF-8\"), simplifyVector = simplifyVector, \r\n    simplifyMatrix = simplifyMatrix, simplifyDataFrame = simplifyDataFrame, \r\n    ...) \r\n6 parser(content, ...) \r\n5 parse_auto(raw, type, encoding, ...) \r\n4 content(r, \"parsed\") at query_item_identifier.R#36\r\n3 query_item_identifier(scheme = \"mda_streams\", type = \"site_root\", \r\n    session = session, limit = limit) at get_sites.R#22\r\n2 get_sites() at post_nwis_ts.R#18\r\n1 post_nwis_ts(variable = \"wtr\", p_code = \"00010\", session, startDate = \"2008-01-01\") \r\n```"}}