Currently the signature of the callback is no parameters.

Change that to have `error` as the first parameter. There are conditions where this code can fail. We should bubble those failures up.