func (client *HTTPFailureClient) getEmptyErrorHandleError(resp *http.Response) error {
	body, err := runtime.Payload(resp)
	if err != nil {
		return runtime.NewResponseError(err, resp)
	}
	errType := Error{raw: string(body)}
	if err := runtime.UnmarshalAsJSON(resp, &errType); err != nil {
		return runtime.NewResponseError(fmt.Errorf("%s\n%s", string(body), err), resp)
	}
	return runtime.NewResponseError(&errType, resp)
}
getEmptyErrorHandleError handles the GetEmptyError error response.
package httpinfrastructuregroup
import (
	"context"
	"errors"
	"fmt"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
	"net/http"
)
type HTTPFailureClient struct {
	con *Connection
}
func NewHTTPFailureClient(con *Connection) *HTTPFailureClient {
	return &HTTPFailureClient{con: con}
}
func (client *HTTPFailureClient) GetEmptyError(ctx context.Context, options *HTTPFailureGetEmptyErrorOptions) (HTTPFailureGetEmptyErrorResponse, error) {
	req, err := client.getEmptyErrorCreateRequest(ctx, options)
	if err != nil {
		return HTTPFailureGetEmptyErrorResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return HTTPFailureGetEmptyErrorResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return HTTPFailureGetEmptyErrorResponse{}, client.getEmptyErrorHandleError(resp)
	}
	return client.getEmptyErrorHandleResponse(resp)
}
func (client *HTTPFailureClient) getEmptyErrorCreateRequest(ctx context.Context, options *HTTPFailureGetEmptyErrorOptions) (*policy.Request, error) {
	urlPath := "/http/failure/emptybody/error"
	req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.con.Endpoint(), urlPath))
	if err != nil {
		return nil, err
	}
	req.Raw().Header.Set("Accept", "application/json")
	return req, nil
}
func (client *HTTPFailureClient) getEmptyErrorHandleResponse(resp *http.Response) (HTTPFailureGetEmptyErrorResponse, error) {
	result := HTTPFailureGetEmptyErrorResponse{RawResponse: resp}
	if err := runtime.UnmarshalAsJSON(resp, &result.Value); err != nil {
		return HTTPFailureGetEmptyErrorResponse{}, runtime.NewResponseError(err, resp)
	}
	return result, nil
}