Skip to content

check for error before looking at response #6

Merged
merged 3 commits into from May 16, 2014

2 participants

@schnie
schnie commented May 14, 2014

Occasionally an error will occur on the requests so we need to check for an error as well as the 200 in the response. If we don't check for the error you can get a "cannot read statusCode of undefined" error and the app crashes.

@rgerard rgerard commented on an outdated diff May 15, 2014
@@ -77,9 +77,10 @@ function getTeamsHierarchy(callback, event) {
function createRequest(url, callback) {
+ console.log(url);
@rgerard
Owner
rgerard added a note May 15, 2014

Could you remove this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@rgerard rgerard commented on the diff May 15, 2014
.gitignore
@@ -36,3 +36,5 @@ Thumbs.db
node_modules/
.idea/
+*.sublime-workspace
+*.sublime-project
@rgerard
Owner
rgerard added a note May 15, 2014

Looks like you need a newline here

@schnie
schnie added a note May 15, 2014

sorry about that - fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@rgerard rgerard merged commit ac67bc0 into rgerard:master May 16, 2014
@rgerard
Owner
rgerard commented May 16, 2014

NPM package has been published as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.