^ I see this pattern in many spots.  You can just say `if (err.status !== 404) { throw err; }` instead.  The `return (0)` is not necessary.

Also, you do not need to catch the exception twice. It will only ever be thrown in the final error callback.  I find that using the `promise.then(successFunction).catch(errorFunction)` idiom instead of `promise.then(successFunction, errorFunction)` is a nice way to remember which one is the error and which one is the success.