JuliusBrussee/caveman · error

objectstore: stat %q: %w

Error message

objectstore: stat %q: %w

What it means

Error "objectstore: stat %q: %w" thrown in JuliusBrussee/caveman.

Source

Thrown at shared/platform/objectstore/objectstore.go:351

		if err := m.client.RemoveObject(ctx, m.bucket, obj.Key, minio.RemoveObjectOptions{VersionID: obj.VersionID}); err != nil {
			return fmt.Errorf("objectstore: delete version %q (%q): %w", obj.Key, obj.VersionID, err)
		}
	}
	if exact && !found {
		// Non-versioned/S3-compatible backends may omit version listings. Ordinary
		// deletion remains idempotent and covers that deployment shape.
		return m.Delete(ctx, keyOrPrefix)
	}
	return nil
}

func (m *minioStore) Exists(ctx context.Context, key string) (bool, error) {
	_, err := m.client.StatObject(ctx, m.bucket, key, minio.StatObjectOptions{})
	if err != nil {
		if minio.ToErrorResponse(err).Code == "NoSuchKey" {
			return false, nil
		}
		return false, fmt.Errorf("objectstore: stat %q: %w", key, err)
	}
	return true, nil
}

func (m *minioStore) List(ctx context.Context, prefix string) ([]string, error) {
	var keys []string
	for obj := range m.client.ListObjects(ctx, m.bucket, minio.ListObjectsOptions{Prefix: prefix, Recursive: true}) {
		if obj.Err != nil {
			return nil, fmt.Errorf("objectstore: list %q: %w", prefix, obj.Err)
		}
		keys = append(keys, obj.Key)
	}
	return keys, nil
}

func (m *minioStore) ListPage(ctx context.Context, prefix, startAfter string, maxKeys int) (ObjectPage, error) {
	if maxKeys <= 0 {
		return ObjectPage{}, fmt.Errorf("objectstore: page size must be positive")

View on GitHub (pinned to 27d5a3981a)

Solutions

  1. Fix the object stat error and retry.

When it happens

Trigger: Thrown at shared/platform/objectstore/objectstore.go:351 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of JuliusBrussee/caveman@27d5a3981a (2026-08-15). Data as JSON: /api/errors/3f23fac38597c5ad. Report an issue: GitHub.