{"record":{"id":"ae59e00331656985","repo":"temporalio/temporal","slug":"failed-to-parse-link-header-invalid-format-s","errorCode":null,"errorMessage":"failed to parse link header: invalid format: %s","messagePattern":"failed to parse link header: invalid format: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"common/nexus/nexusrpc/api.go","lineNumber":162,"sourceCode":"\t\treturn \"\", fmt.Errorf(\"failed to encode link: %w\", err)\n\t}\n\tif err := validateLinkType(link.Type); err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to encode link: %w\", err)\n\t}\n\treturn fmt.Sprintf(`<%s>; %s=\"%s\"`, link.URL.String(), linkTypeKey, link.Type), nil\n}\n\n// decodeLink decodes the Nexus-Link header values.\n// It must have the same format of HTTP Link header: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Link\nfunc decodeLink(encodedLink string) (nexus.Link, error) {\n\tvar link nexus.Link\n\tencodedLink = strings.TrimSpace(encodedLink)\n\tif len(encodedLink) == 0 {\n\t\treturn link, errors.New(\"failed to parse link header: value is empty\")\n\t}\n\n\tif encodedLink[0] != '<' {\n\t\treturn link, fmt.Errorf(\"failed to parse link header: invalid format: %s\", encodedLink)\n\t}\n\turlEnd := strings.Index(encodedLink, \">\")\n\tif urlEnd == -1 {\n\t\treturn link, fmt.Errorf(\"failed to parse link header: invalid format: %s\", encodedLink)\n\t}\n\turlStr := strings.TrimSpace(encodedLink[1:urlEnd])\n\tif len(urlStr) == 0 {\n\t\treturn link, errors.New(\"failed to parse link header: url is empty\")\n\t}\n\tu, err := url.Parse(urlStr)\n\tif err != nil {\n\t\treturn link, fmt.Errorf(\"failed to parse link header: invalid url: %s\", urlStr)\n\t}\n\tif err := validateLinkURL(u); err != nil {\n\t\treturn link, fmt.Errorf(\"failed to parse link header: %w\", err)\n\t}\n\tlink.URL = u\n","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/temporalio/temporal/blob/bde624efd13fbd3843654058db6d9c716166318b/common/nexus/nexusrpc/api.go#L144-L180","documentation":"Error \"failed to parse link header: invalid format: %s\" thrown in temporalio/temporal.","triggerScenarios":"Thrown at common/nexus/nexusrpc/api.go:162 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bde624efd13fbd3843654058db6d9c716166318b","analyzedAt":"2026-09-01T07:18:39.080Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}