henrygd/beszel · error

no logs in response

Error message

no logs in response

What it means

unmarshalLegacyResponse returns this when a GetContainerLogs response has resp.String == nil, meaning the legacy agent sent no logs payload. The container-logs request technically succeeded but the payload is absent.

Source

Thrown at internal/hub/transport/transport.go:76

		*d = *resp.SystemData
		return nil
	case common.CheckFingerprint:
		d, ok := dest.(*common.FingerprintResponse)
		if !ok {
			return fmt.Errorf("unexpected dest type for CheckFingerprint: %T", dest)
		}
		if resp.Fingerprint == nil {
			return errors.New("no fingerprint in response")
		}
		*d = *resp.Fingerprint
		return nil
	case common.GetContainerLogs:
		d, ok := dest.(*string)
		if !ok {
			return fmt.Errorf("unexpected dest type for GetContainerLogs: %T", dest)
		}
		if resp.String == nil {
			return errors.New("no logs in response")
		}
		*d = *resp.String
		return nil
	case common.GetContainerInfo:
		d, ok := dest.(*string)
		if !ok {
			return fmt.Errorf("unexpected dest type for GetContainerInfo: %T", dest)
		}
		if resp.String == nil {
			return errors.New("no info in response")
		}
		*d = *resp.String
		return nil
	case common.GetSmartData:
		switch d := dest.(type) {
		case *map[string]smart.SmartData:
			if resp.SmartData == nil {
				return errors.New("no SMART data in response")

View on GitHub (pinned to b38fb7dafa)

Solutions

  1. Verify the container exists and is running on the host
  2. Update the agent to a version supporting GetContainerLogs
  3. Check agent logs for an underlying container-runtime error
  4. Retry the request
Defensive patterns

Strategy: validation

Validate before calling

// only request logs for containers known to be running on the host
if !containerRunning(host, containerName) {
    return nil
}

Try / catch

if err := UnmarshalResponse(resp, common.GetContainerLogs, dest); err != nil {
    if strings.Contains(err.Error(), "no logs") {
        return nil // treat as empty logs
    }
    return err
}

Prevention

When it happens

Trigger: UnmarshalResponse on a GetContainerLogs request where the legacy AgentResponse has an empty String field.

Common situations: Container no longer exists or stopped before logs were gathered (agent had nothing to send); agent version not supporting container logs; mismatch between hub request and agent capabilities.

Related errors


AI-assisted analysis of henrygd/beszel@b38fb7dafa (2026-08-31). Data as JSON: /api/errors/bca8371ab6f6fc99. Report an issue: GitHub.