Skip to content

Commit

Permalink
Improved error handling of non json response
Browse files Browse the repository at this point in the history
  • Loading branch information
kippandrew committed Oct 30, 2013
1 parent 11cefb8 commit 936fb29
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/lucid.R
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,10 @@ handleResponse <- function(response, jsonFilter = NULL) {

# otherwise just dump the whole thing
else {
reportError(response$content)
if (response$status %in% 200:399)
response$content
else
reportError(response$content)
}
}

Expand Down

0 comments on commit 936fb29

Please sign in to comment.