func (apiError APIError) IsMissing() bool {
	return apiError.StatusCode == http.StatusNotFound
}
IsMissing tells if it is missing resource
package common
import (
	"bytes"
	"context"
	"encoding/json"
	"errors"
	"fmt"
	"io/ioutil"
	"log"
	"net/http"
	"net/url"
	"reflect"
	"regexp"
	"strings"
	"github.com/google/go-querystring/query"
	"github.com/hashicorp/go-retryablehttp"
)
var (
	e2example                   = "https://registry.terraform.io/providers/databrickslabs/databricks/latest/docs/guides/aws-workspace"
	accountsHost                = "accounts.cloud.databricks.com"
	transientErrorStringMatches = []string{
		"com.databricks.backend.manager.util.UnknownWorkerEnvironmentException",
		"does not have any associated worker environments",
		"There is no worker environment with id",
		"Unknown worker environment",
		"ClusterNotReadyException",
		"connection reset by peer",
		"connection refused",
		"Unexpected error",
		"i/o timeout",
	}
)
type APIErrorBody struct {
	ErrorCode string `json:"error_code,omitempty"`
	Message   string `json:"message,omitempty"`
	ScimDetail string `json:"detail,omitempty"`
	ScimStatus string `json:"status,omitempty"`
	API12Error string `json:"error,omitempty"`
}
type APIError struct {
	ErrorCode  string
	Message    string
	Resource   string
	StatusCode int
}
func (apiError APIError) Error() string {
	if apiError.StatusCode != 404 {
		docs := apiError.DocumentationURL()
		log.Printf("[WARN] %s:%d - %s %s", apiError.Resource, apiError.StatusCode, apiError.Message, docs)
	}
	return apiError.Message
}
func IsMissing(err error) bool {
	if err == nil {
		return false
	}
	e, ok := err.(APIError)
	return ok && e.IsMissing()
}