ipfs/kubo · error

out.Err (server-provided error message)

Error message

out.Err (server-provided error message)

What it means

During pin verify the client streams progress from the daemon; when the stream carries a final X-Stream-Error-style trailer (out.Err non-empty), the client surfaces the server-provided string verbatim via errors.New(out.Err). The text is produced by the remote daemon, not this library.

Source

Thrown at client/rpc/pin.go:229

					Cid string
					Err string
				}
			}
			if err := dec.Decode(&out); err != nil {
				if err == io.EOF {
					return
				}
				select {
				case res <- pinVerifyRes{err: err}:
					return
				case <-ctx.Done():
					return
				}
			}

			if out.Err != "" {
				select {
				case res <- pinVerifyRes{err: errors.New(out.Err)}:
					return
				case <-ctx.Done():
					return
				}
			}

			badNodes := make([]iface.BadPinNode, len(out.BadNodes))
			for i, n := range out.BadNodes {
				c, err := cid.Decode(n.Cid)
				if err != nil {
					badNodes[i] = badNode{cid: c, err: err}
					continue
				}

				if n.Err != "" {
					err = errors.New(n.Err)
				}
				badNodes[i] = badNode{cid: c, err: err}

View on GitHub (pinned to 329838acdf)

Solutions

  1. Read the message to learn the daemon-side cause (missing block, timeout) and address that root cause.
  2. Retry Verify for transient network failures; verification is read-only and idempotent.
  3. If blocks are missing, repair with `ipfs dag stat`/re-fetch the content or re-add from source, then re-verify.
  4. Increase the daemon timeout or run verification in smaller scopes (verify per-path) to avoid mid-stream failures.
Defensive patterns

Strategy: retry

Try / catch

var lastErr error
for attempt := 0; attempt < 3; attempt++ {
    res, err := api.Pin().Verify(ctx, p)
    if err != nil {
        lastErr = err
        time.Sleep(backoff(attempt)) // message text indicates daemon-side cause
        continue
    }
    return res, nil
}
return nil, fmt.Errorf("pin verify failed after retries: %w", lastErr)

Prevention

When it happens

Trigger: api.Pin().Verify(ctx, path) where the daemon reports a stream-level failure mid-verification — e.g. a block fetch failed, the verification session errored out, or the connection dropped and the daemon wrote an error trailer before closing.

Common situations: Verifying large pinsets over unstable links, verifying content whose underlying blocks are missing from the datastore, or daemon-side timeouts during long verifications.

Related errors


AI-assisted analysis of ipfs/kubo@329838acdf (2026-09-03). Data as JSON: /api/errors/aa3d01c2cc016490. Report an issue: GitHub.