X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/bd7da3557dc7a17020931f5a49ed5007fa81a645..03ef9525ba0e62037b55606b851ee746967a003f:/chatgpt.go diff --git a/chatgpt.go b/chatgpt.go index 49be015..a5d9ee3 100644 --- a/chatgpt.go +++ b/chatgpt.go @@ -458,5 +458,10 @@ func chatgptLogin(ctx context.Context, out io.Writer) (err error) { err = errors.Join(err, tokens.Close()) }() - return newChatGPTAuth(filepath.Join(dir, chatgptTokenFileName), chatgptIssuer).Login(ctx, out) + err = newChatGPTAuth(filepath.Join(dir, chatgptTokenFileName), chatgptIssuer).Login(ctx, out) + if err != nil { + return fmt.Errorf("complete device login: %w", err) + } + + return nil }