def _handle_error_response(self, bucket_name=None):
        """
        Sets error response uses xml body if available, otherwise
        relies on HTTP headers.
        """
        if not self._response.data:
            self._set_error_response_without_body(bucket_name)
        else:
            self._set_error_response_with_body(bucket_name)
Sets error response uses xml body if available, otherwise
        relies on HTTP headers.