temporalio/temporal · error

invalid links header: %q

Error message

invalid links header: %q

What it means

Error "invalid links header: %q" thrown in temporalio/temporal.

Source

Thrown at common/nexus/nexusrpc/client.go:298

	if err := addLinksToHTTPHeader(options.Links, request.Header); err != nil {
		return nil, fmt.Errorf("failed to serialize links into header: %w", err)
	}
	addContextTimeoutToHTTPHeader(ctx, request.Header)
	addNexusHeaderToHTTPHeader(options.Header, request.Header)

	response, err := c.httpCaller(request)
	if err != nil {
		return nil, err
	}

	links, err := getLinksFromHeader(response.Header)
	if err != nil {
		// Have to read body here to check if it is a Failure.
		body, err := readAndReplaceBody(response)
		if err != nil {
			return nil, err
		}
		return nil, fmt.Errorf(
			"%w: %w",
			newUnexpectedResponseError(
				fmt.Sprintf("invalid links header: %q", response.Header.Values(headerLink)),
				response,
				body,
			),
			err,
		)
	}

	// Do not close response body here to allow successful result to read it.
	if response.StatusCode == http.StatusOK {
		return &ClientStartOperationResponse[*nexus.LazyValue]{
			Successful: nexus.NewLazyValue(
				c.serializer,
				&nexus.Reader{
					ReadCloser: response.Body,
					Header:     prefixStrippedHTTPHeaderToNexusHeader(response.Header, "content-"),

View on GitHub (pinned to bde624efd1)

When it happens

Trigger: Thrown at common/nexus/nexusrpc/client.go:298 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of temporalio/temporal@bde624efd1 (2026-09-01). Data as JSON: /api/errors/abc53275494c605c. Report an issue: GitHub.