gulthor/grex — pull request #56 by petteraas (2014-12-08 12:46:02+00:00)
Title: Add error handling of client.fetch

When `err` is something, `response` is undefined, thus referencing `response.results` breaks, actually checking for `err` seems to be the most reasonable solution here.

I copied the tests for `.execute` and rewrote them slightly for `.fetch` as they show the problem, but I can probably add a extra more specific test if requested?

I originally found the problem when I tried fetch on a gremlin query with a typo in it.