weaviate/weaviate · error

ErrExportValidation

ErrExportValidation

Error message

%w: export id too long: %d characters, max %d

What it means

Guard in validateExportID: the requested export ID exceeds the maximum allowed length (exportIDMaxLength). Long IDs can break backend key/path limits, so the request is rejected before touching storage. Wraps the ErrExportValidation sentinel.

Source

Thrown at usecases/export/scheduler.go:922

// getExportMetadata retrieves export metadata from the backend
func (s *Scheduler) getExportMetadata(ctx context.Context, backend modulecapabilities.BackupBackend, exportID, bucket, path string) (*ExportMetadata, error) {
	data, err := backend.GetObject(ctx, exportID, exportMetadataFile, bucket, path)
	if err != nil {
		return nil, fmt.Errorf("get metadata: %w", err)
	}

	var meta ExportMetadata
	if err := json.Unmarshal(data, &meta); err != nil {
		return nil, fmt.Errorf("unmarshal metadata: %w", err)
	}

	return &meta, nil
}

func validateExportID(id string) error {
	if len(id) > exportIDMaxLength {
		return fmt.Errorf("%w: export id too long: %d characters, max %d", ErrExportValidation, len(id), exportIDMaxLength)
	}
	if !regExpID.MatchString(id) {
		return fmt.Errorf("%w: invalid export id: '%v' allowed characters are lowercase, 0-9, _, -", ErrExportValidation, id)
	}
	return nil
}

// requiresBucket returns true for backends that need an explicit bucket
// to avoid silently falling back to the backup module's default bucket.
func requiresBucket(backend string) bool {
	switch backend {
	case "s3", "gcs", "azure":
		return true
	default:
		return false
	}
}

View on GitHub (pinned to 75aa4b6d11)

Solutions

  1. Shorten the export ID or use a UUID
  2. Enforce the ID length limit at the API client
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at usecases/export/scheduler.go:922 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04). Data as JSON: /api/errors/9a9c623d2600eee5. Report an issue: GitHub.