mostlyserious/riak-js — pull request #181 by mtabini (2013-07-16 13:32:05+00:00)
Title: Improve 404 handling

I think there might be a small issue with 404 handling in a pooled-connection setup. The 404 gets trapped in the `execute` function, and never reaches `handleError`, so `no404Error` directives are never processed.

This pull request proposes a fix, and also causes a 404 to return a null document instead of a hash of the error (which can be derived from the meta). This seems like a cleaner solution, since you can more easily check for null than for a 404 in the response.

Hopefully, I got this right. If not let me know :-)