Error handling for weird json response