func (client *NumberClient) getBigDecimalHandleError(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)
}
getBigDecimalHandleError handles the GetBigDecimal error response.
package numbergroup
import (
	"context"
	"fmt"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
	"net/http"
)
type NumberClient struct {
	con *Connection
}
func NewNumberClient(con *Connection) *NumberClient {
	return &NumberClient{con: con}
}
func (client *NumberClient) GetBigDecimal(ctx context.Context, options *NumberGetBigDecimalOptions) (NumberGetBigDecimalResponse, error) {
	req, err := client.getBigDecimalCreateRequest(ctx, options)
	if err != nil {
		return NumberGetBigDecimalResponse{}, err
	}
	resp, err := client.con.Pipeline().Do(req)
	if err != nil {
		return NumberGetBigDecimalResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return NumberGetBigDecimalResponse{}, client.getBigDecimalHandleError(resp)
	}
	return client.getBigDecimalHandleResponse(resp)
}
func (client *NumberClient) getBigDecimalCreateRequest(ctx context.Context, options *NumberGetBigDecimalOptions) (*policy.Request, error) {
	urlPath := "/number/big/decimal/2.5976931e+101"
	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 *NumberClient) getBigDecimalHandleResponse(resp *http.Response) (NumberGetBigDecimalResponse, error) {
	result := NumberGetBigDecimalResponse{RawResponse: resp}
	if err := runtime.UnmarshalAsJSON(resp, &result.Value); err != nil {
		return NumberGetBigDecimalResponse{}, runtime.NewResponseError(err, resp)
	}
	return result, nil
}