func (err *APIError) Error() string {
	if err.requestBody != "" {
		return fmt.Sprintf("failed to load %s with status %s: \"%s\"", err.callType, err.requestStatus, err.requestBody)
	}
	return fmt.Sprintf("failed to load %s: %s", err.callType, err.err)
}
Error returns the docker API error as a string.
package docker
import "fmt"
const (
	manifestType = "manifest"
	configType   = "config"
)
type APIError struct {
	callType      string
	requestStatus string
	requestBody   string
	err           error
}