fix #2496
Whether this is a bad-request (missing XML attributes or elements) or an internal server error.