Added envelope for HTTP errors