Skip to content

Commit 49f6802

Browse files
gcmsgclaude
andcommitted
fix: handle error return from identity.Sign() in claim command
The core identity.Sign() signature changed from returning a single string to returning (string, error). Update the claim command to propagate the error with an appropriate message and exit code. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4f74607 commit 49f6802

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

internal/cmd/claim.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ func runAgentClaim(args []string, serverURL string) int {
4848
}
4949

5050
// Sign the token to prove key ownership.
51-
sig := identity.Sign(kp.PrivateKey, []byte(*token))
51+
sig, err := identity.Sign(kp.PrivateKey, []byte(*token))
52+
if err != nil {
53+
fmt.Fprintf(os.Stderr, "Error signing token: %v\n", err)
54+
return 1
55+
}
5256

5357
var caps []string
5458
if *capabilities != "" {

0 commit comments

Comments
 (0)