lib/fb_graph/node.rb in fb_graph-0.2.0 vs lib/fb_graph/node.rb in fb_graph-0.2.1

- old
+ new

@@ -84,13 +84,11 @@ raise FbGraph::NotFound.new(404, 'Graph API returned false, so probably it means your requested object is not found.') else _response_ = JSON.parse(response.body).with_indifferent_access if _response_[:error] case _response_[:error][:type] - when 'OAuthAccessTokenException' + when 'OAuthAccessTokenException', 'QueryParseException' raise FbGraph::Unauthorized.new(401, _response_[:error][:message]) - when 'QueryParseException' - raise FbGraph::NotFound.new(404, _response_[:error][:message]) else raise FbGraph::Exception.new(400, "#{_response_[:error][:type]} :: #{_response_[:error][:message]}") end else _response_ \ No newline at end of file