scraperwiki/custard — pull request #605 by pwaller (2014-05-09 20:54:18+00:00)
Title: Add missing error checks to custard

This pull request consists of two pieces.

I don't know whether it is a good idea but I figure the discussion it
starts will be a good thing either way (like the 404 PR).

1) I tried to make consistent more of the whitespace surrounding error handling.
The convention is that in callbacks that have an `(err)` parameter, there
should be error handling first, and there should be whitespace after it,
so it's obvious from 10,000 ft that it's there next to the definition.

2) Using the new convention above, I looked at the code from 10,000 ft and
spotted all of the missing error cases and a missing return.

This is rather an invasive change and might make the UX seem worse in some
cases because previously it may have blundered on and not complained much,
leading to at worst a UI which is broken in a non-obvious way.

Now we show them error messages. I think the latter is worse in the short
term but better in the long run as it will enable us to fix the "hm, why
does that button need to be clicked several times before it works" style of
problem.