goharbor/harbor · error
empty JSON data
Error message
empty JSON data
What it means
Error "empty JSON data" thrown in goharbor/harbor.
Source
Thrown at src/pkg/p2p/preheat/provider/preheat_image.go:60
Headers map[string]any `json:"headers"`
// The image name
ImageName string `json:"image,omitempty"`
// The tag
Tag string `json:"tag,omitempty"`
// Digest of the preheating image
Digest string `json:"digest"`
// ExtraAttrs contains extra attributes for the preheating image.
ExtraAttrs map[string]any `json:"extra_attrs,omitempty"`
}
// FromJSON build preheating image from the given data.
func (img *PreheatImage) FromJSON(data string) error {
if len(data) == 0 {
return errors.New("empty JSON data")
}
if err := json.Unmarshal([]byte(data), img); err != nil {
return fmt.Errorf("construct preheating image error: %w", err)
}
return nil
}
// ToJSON encodes the preheating image to JSON data.
func (img *PreheatImage) ToJSON() (string, error) {
data, err := json.Marshal(img)
if err != nil {
return "", fmt.Errorf("encode preheating image error: %w", err)
}
return string(data), nil
}View on GitHub (pinned to 7b2fd08cc5)
When it happens
Trigger: Thrown at src/pkg/p2p/preheat/provider/preheat_image.go:60 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of goharbor/harbor@7b2fd08cc5 (2026-08-16).
Data as JSON: /api/errors/9d6b37a89aff0ea5.
Report an issue: GitHub.