Factor out exploding in callback API

It's not quite as convenient as the promise API, in which errors pop
up at the end of the then-chaining (provided you remember to return
things correctly). This is a lowest-common denominator approach, and
it keeps the programs self-contained.

The repetition indicates there's probably a nicer way to deal with
errors. Or not (because JavaScript).