{"action":"created","issue":{"url":"https://api.github.com/repos/patchoo/patchoo/issues/13","repository_url":"https://api.github.com/repos/patchoo/patchoo","labels_url":"https://api.github.com/repos/patchoo/patchoo/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/patchoo/patchoo/issues/13/comments","events_url":"https://api.github.com/repos/patchoo/patchoo/issues/13/events","html_url":"https://github.com/patchoo/patchoo/issues/13","id":34132112,"number":13,"title":"improve error handling","user":{"login":"loceee","id":6110941,"avatar_url":"https://avatars.githubusercontent.com/u/6110941?v=3","gravatar_id":"","url":"https://api.github.com/users/loceee","html_url":"https://github.com/loceee","followers_url":"https://api.github.com/users/loceee/followers","following_url":"https://api.github.com/users/loceee/following{/other_user}","gists_url":"https://api.github.com/users/loceee/gists{/gist_id}","starred_url":"https://api.github.com/users/loceee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loceee/subscriptions","organizations_url":"https://api.github.com/users/loceee/orgs","repos_url":"https://api.github.com/users/loceee/repos","events_url":"https://api.github.com/users/loceee/events{/privacy}","received_events_url":"https://api.github.com/users/loceee/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/patchoo/patchoo/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"loceee","id":6110941,"avatar_url":"https://avatars.githubusercontent.com/u/6110941?v=3","gravatar_id":"","url":"https://api.github.com/users/loceee","html_url":"https://github.com/loceee","followers_url":"https://api.github.com/users/loceee/followers","following_url":"https://api.github.com/users/loceee/following{/other_user}","gists_url":"https://api.github.com/users/loceee/gists{/gist_id}","starred_url":"https://api.github.com/users/loceee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loceee/subscriptions","organizations_url":"https://api.github.com/users/loceee/orgs","repos_url":"https://api.github.com/users/loceee/repos","events_url":"https://api.github.com/users/loceee/events{/privacy}","received_events_url":"https://api.github.com/users/loceee/received_events","type":"User","site_admin":false},"assignees":[{"login":"loceee","id":6110941,"avatar_url":"https://avatars.githubusercontent.com/u/6110941?v=3","gravatar_id":"","url":"https://api.github.com/users/loceee","html_url":"https://github.com/loceee","followers_url":"https://api.github.com/users/loceee/followers","following_url":"https://api.github.com/users/loceee/following{/other_user}","gists_url":"https://api.github.com/users/loceee/gists{/gist_id}","starred_url":"https://api.github.com/users/loceee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loceee/subscriptions","organizations_url":"https://api.github.com/users/loceee/orgs","repos_url":"https://api.github.com/users/loceee/repos","events_url":"https://api.github.com/users/loceee/events{/privacy}","received_events_url":"https://api.github.com/users/loceee/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/patchoo/patchoo/milestones/2","html_url":"https://github.com/patchoo/patchoo/milestones/1.0","labels_url":"https://api.github.com/repos/patchoo/patchoo/milestones/2/labels","id":663937,"number":2,"title":"1.0","description":"","creator":{"login":"loceee","id":6110941,"avatar_url":"https://avatars.githubusercontent.com/u/6110941?v=3","gravatar_id":"","url":"https://api.github.com/users/loceee","html_url":"https://github.com/loceee","followers_url":"https://api.github.com/users/loceee/followers","following_url":"https://api.github.com/users/loceee/following{/other_user}","gists_url":"https://api.github.com/users/loceee/gists{/gist_id}","starred_url":"https://api.github.com/users/loceee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loceee/subscriptions","organizations_url":"https://api.github.com/users/loceee/orgs","repos_url":"https://api.github.com/users/loceee/repos","events_url":"https://api.github.com/users/loceee/events{/privacy}","received_events_url":"https://api.github.com/users/loceee/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2014-05-20T01:52:43Z","updated_at":"2014-05-22T23:48:16Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2014-05-22T23:48:16Z","updated_at":"2016-07-01T13:35:57Z","closed_at":null,"body":"We really need a proper error handler, and there are many places *marked with (error checking)* in the comments that we should place some error checking on. And a core error handler that will return meaningful codes to the JSS logs.\r\n\r\nThis will be a target for 1.0 as functionality wise I am happy to freeze features at 0.99 unless someone comes up with some extra cool ideas."},"comment":{"url":"https://api.github.com/repos/patchoo/patchoo/issues/comments/229948151","html_url":"https://github.com/patchoo/patchoo/issues/13#issuecomment-229948151","issue_url":"https://api.github.com/repos/patchoo/patchoo/issues/13","id":229948151,"user":{"login":"willpolley","id":859997,"avatar_url":"https://avatars.githubusercontent.com/u/859997?v=3","gravatar_id":"","url":"https://api.github.com/users/willpolley","html_url":"https://github.com/willpolley","followers_url":"https://api.github.com/users/willpolley/followers","following_url":"https://api.github.com/users/willpolley/following{/other_user}","gists_url":"https://api.github.com/users/willpolley/gists{/gist_id}","starred_url":"https://api.github.com/users/willpolley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willpolley/subscriptions","organizations_url":"https://api.github.com/users/willpolley/orgs","repos_url":"https://api.github.com/users/willpolley/repos","events_url":"https://api.github.com/users/willpolley/events{/privacy}","received_events_url":"https://api.github.com/users/willpolley/received_events","type":"User","site_admin":false},"created_at":"2016-07-01T13:35:57Z","updated_at":"2016-07-01T13:35:57Z","body":"I think I removed some of these sections in the API put sections since the code did nothing. 😄 Oops. You can change the curl output to include a http response code on a new line.\r\n\r\n```\r\nres=`curl \"${jssURL}JSSResource/computers/udid/$hwUDID\" --user \"$jssUser:$jssPW\" --silent -H \"Content-Type: text/xml\" -X PUT -d \"<computer><general><site><name>$SITE</name></site></general></computer>\" -w \"\\n%{http_code}\"`\r\nres=`echo $res | awk {'print $NF'}`\r\nif [ $res -ne \"201\" ]; then\r\n     echo \"Site Assignment Error $res\"\r\nfi\r\n```\r\nThis only checks for success or no. Here are a list of codes, https://unofficial-jss-api-docs.atlassian.net/wiki#TheUnofficialJSSAPIDocs-HTTPstatuscodes\r\n\r\nThis is something I can work on if you'd like."}}
{"actor":{"display_login":"willpolley"}}