Skip to content

Commit 1bf361f

Browse files
committed
Improved login error message
1 parent 05dccca commit 1bf361f

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.6.1
1+
v0.6.2

sdk/login.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ func (client *Client) redeemCodeForAccessToken(code string) (*LoginRedeemCodeRes
7272
return nil, err
7373
}
7474
if status != http.StatusOK {
75+
if status == http.StatusUnauthorized {
76+
return nil, errors.New("verify you're using the client secret's value (not ID) and the API permissions are set correctly")
77+
}
7578
return nil, client.handleResponseError(status, resp)
7679
}
7780
var json LoginRedeemCodeResponse

version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
package main
22

3-
var AppVersion = "v0.6.1"
3+
var AppVersion = "v0.6.2"

0 commit comments

Comments
 (0)