add actual error message

This commit is contained in:
Astra 2025-06-06 13:06:10 +01:00
parent 878efc08d0
commit b052d69df7

View file

@ -3,6 +3,7 @@ package bsky
import ( import (
"encoding/json" "encoding/json"
"errors" "errors"
"fmt"
"net/http" "net/http"
"net/url" "net/url"
"os" "os"
@ -103,7 +104,7 @@ func (b *BSky) Auth(authData []string) error {
b.Bluesky.Cfg.AppPassword = authData[1] b.Bluesky.Cfg.AppPassword = authData[1]
err = b.Bluesky.CreateSession(b.Bluesky.Cfg) err = b.Bluesky.CreateSession(b.Bluesky.Cfg)
if err != nil { if err != nil {
return errors.New("unable to auth") return errors.New(fmt.Sprintf("unable to auth: %s", err))
} }
b.Bluesky.Cfg.AppPassword = "" // we don't need to save this b.Bluesky.Cfg.AppPassword = "" // we don't need to save this
PersistAuthSession(b.Bluesky.Cfg) PersistAuthSession(b.Bluesky.Cfg)