expose more meta information on HTTP errors

Same as #67