goreleaser/goreleaser · error
could not GET /v2/me: %w
Error message
could not GET /v2/me: %w
What it means
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.
Source
Thrown at internal/pipe/linkedin/client.go:86
return client{
client: c,
baseURL: "https://api.linkedin.com",
}, nil
}
// getProfileIDLegacy returns the Current Member's ID
// it's legacy because it uses deprecated v2/me endpoint, that requires old permissions such as r_liteprofile
// POST Share API requires a Profile ID in the 'owner' field
// Format must be in: 'urn:li:person:PROFILE_ID'
// https://docs.microsoft.com/en-us/linkedin/shared/integrations/people/profile-api#retrieve-current-members-profile
func (c client) getProfileIDLegacy(ctx stdctx.Context) (string, error) {
req, err := http.NewRequestWithContext(ctx, http.MethodGet, c.baseURL+"/v2/me", http.NoBody)
if err != nil {
return "", fmt.Errorf("could not create GET request: %w", err)
}
resp, err := c.client.Do(req)
if err != nil {
return "", fmt.Errorf("could not GET /v2/me: %w", err)
}
defer resp.Body.Close()
if resp.StatusCode == http.StatusForbidden {
return "", ErrLinkedinForbidden
}
if resp.StatusCode >= http.StatusBadRequest {
body, _ := io.ReadAll(resp.Body)
return "", retryx.HTTP(gerrors.Wrap(
fmt.Errorf("GET /v2/me returned %d %s", resp.StatusCode, http.StatusText(resp.StatusCode)),
gerrors.WithOutput(string(body)),
), resp)
}
value, err := io.ReadAll(resp.Body)
if err != nil {
return "", fmt.Errorf("could not read response body: %w", err)View on GitHub (pinned to f5edd73956)
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
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at internal/pipe/linkedin/client.go:86 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of goreleaser/goreleaser@f5edd73956 (2026-09-05).
Data as JSON: /api/errors/c4a71175a4ec650e.
Report an issue: GitHub.