Skip to content

Commit

Permalink
Add error handling for json unmarshaling in during the auth handshake
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkJaroski committed Aug 25, 2024
1 parent 138f280 commit 4e676c5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bot.go
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,10 @@ func authorizeApp() {
}

var resp DeviceCodeGrant
json.Unmarshal(resData, &resp)
err = json.Unmarshal(resData, &resp)
if err != nil {
Log.Error("Error unmarshaling json:", err.Error())
}

fmt.Println("Please visit this URL and enter the code below " + resp.VerificationURI)
fmt.Println()
Expand Down

0 comments on commit 4e676c5

Please sign in to comment.