1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-08 03:31:59 +02:00

fix: improve linkedin error message

refs https://github.com/goreleaser/goreleaser/issues/4421
This commit is contained in:
Carlos Alexandro Becker 2024-02-01 22:56:04 -03:00
parent f62e94528f
commit 6f72ac3459
No known key found for this signature in database

View File

@ -114,8 +114,7 @@ func (c client) getProfileSub() (string, error) {
defer resp.Body.Close()
var result map[string]interface{}
err = json.Unmarshal(value, &result)
if err != nil {
if err := json.Unmarshal(value, &result); err != nil {
return "", fmt.Errorf("could not unmarshal: %w", err)
}
@ -123,7 +122,7 @@ func (c client) getProfileSub() (string, error) {
return v.(string), nil
}
return "", fmt.Errorf("could not find 'sub' in result: %w", err)
return "", fmt.Errorf("could not find 'sub' in result: %v", result)
}
// Person or Organization URN - urn:li:person:PROFILE_IDENTIFIER