goharbor/harbor · error

the value of speed isn't integer (%T)

Error message

the value of speed isn't integer (%T)

What it means

Error "the value of speed isn't integer (%T)" thrown in goharbor/harbor.

Source

Thrown at src/jobservice/job/impl/replication/replication.go:140

	if err := parseParam(params, "dst_resource", dst); err != nil {
		return nil, nil, nil, err
	}

	var speed int32
	value, exist := params["speed"]
	if !exist {
		speed = 0
	} else {
		if s, ok := value.(int32); ok {
			speed = s
		} else {
			if s, ok := value.(int); ok {
				speed = int32(s)
			} else {
				if s, ok := value.(float64); ok {
					speed = int32(s)
				} else {
					return nil, nil, nil, fmt.Errorf("the value of speed isn't integer (%T)", value)
				}
			}
		}
	}

	var copyByChunk bool
	value, exist = params["copy_by_chunk"]
	if exist {
		if boolVal, ok := value.(bool); ok {
			copyByChunk = boolVal
		}
	}

	opts := transfer.NewOptions(
		transfer.WithSpeed(speed),
		transfer.WithCopyByChunk(copyByChunk),
	)
	return src, dst, opts, nil

View on GitHub (pinned to 7b2fd08cc5)

When it happens

Trigger: Thrown at src/jobservice/job/impl/replication/replication.go:140 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/0812e25b8a21a4f9. Report an issue: GitHub.