httpbakery: expose slightly more errors machinery

We want to be able to integrate httpbakery into an existing JSON
framework.