{"record":{"id":"c4a71175a4ec650e","repo":"goreleaser/goreleaser","slug":"could-not-get-v2-me-w","errorCode":null,"errorMessage":"could not GET /v2/me: %w","messagePattern":"could not GET /v2/me: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/pipe/linkedin/client.go","lineNumber":86,"sourceCode":"\treturn client{\n\t\tclient:  c,\n\t\tbaseURL: \"https://api.linkedin.com\",\n\t}, nil\n}\n\n// getProfileIDLegacy returns the Current Member's ID\n// it's legacy because it uses deprecated v2/me endpoint, that requires old permissions such as r_liteprofile\n// POST Share API requires a Profile ID in the 'owner' field\n// Format must be in: 'urn:li:person:PROFILE_ID'\n// https://docs.microsoft.com/en-us/linkedin/shared/integrations/people/profile-api#retrieve-current-members-profile\nfunc (c client) getProfileIDLegacy(ctx stdctx.Context) (string, error) {\n\treq, err := http.NewRequestWithContext(ctx, http.MethodGet, c.baseURL+\"/v2/me\", http.NoBody)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"could not create GET request: %w\", err)\n\t}\n\tresp, err := c.client.Do(req)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"could not GET /v2/me: %w\", err)\n\t}\n\tdefer resp.Body.Close()\n\n\tif resp.StatusCode == http.StatusForbidden {\n\t\treturn \"\", ErrLinkedinForbidden\n\t}\n\n\tif resp.StatusCode >= http.StatusBadRequest {\n\t\tbody, _ := io.ReadAll(resp.Body)\n\t\treturn \"\", retryx.HTTP(gerrors.Wrap(\n\t\t\tfmt.Errorf(\"GET /v2/me returned %d %s\", resp.StatusCode, http.StatusText(resp.StatusCode)),\n\t\t\tgerrors.WithOutput(string(body)),\n\t\t), resp)\n\t}\n\n\tvalue, err := io.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"could not read response body: %w\", err)","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/goreleaser/goreleaser/blob/f5edd7395693c0c6b501dc722d445d2e86af854d/internal/pipe/linkedin/client.go#L68-L104","documentation":"Wrapped error in getProfileIDLegacy: the HTTP round trip for GET /v2/me failed at the transport level (DNS, TLS, connection). The %w chain carries the net/http client error; LinkedIn API semantics errors are handled separately by status code below.","triggerScenarios":"Thrown at internal/pipe/linkedin/client.go:86 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check network connectivity to api.linkedin.com","Transient network errors can be retried per the configured retry policy","Verify the access token is valid and not expired for LinkedIn API calls"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f5edd7395693c0c6b501dc722d445d2e86af854d","analyzedAt":"2026-09-05T09:57:18.807Z","contentChangedAt":"2026-09-05T09:57:18.807Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}