fixes bug 870045 - Carry error codes from the middleware into the public...

... web API

@AdrianGaudebert or @rhelmer r?