add error message while posting
This commit is contained in:
@@ -2,7 +2,9 @@ package output
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
|
"os"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/bluesky-social/indigo/api/atproto"
|
"github.com/bluesky-social/indigo/api/atproto"
|
||||||
@@ -60,5 +62,10 @@ func (bo *blueskyoutput) Write(str string) error {
|
|||||||
}},
|
}},
|
||||||
}
|
}
|
||||||
_, recerr := atproto.RepoCreateRecord(context.TODO(), bo.client, Recordinput)
|
_, recerr := atproto.RepoCreateRecord(context.TODO(), bo.client, Recordinput)
|
||||||
|
|
||||||
|
if recerr != nil {
|
||||||
|
fmt.Fprint(os.Stderr, "bsky err: ")
|
||||||
|
fmt.Fprintln(os.Stderr, recerr)
|
||||||
|
}
|
||||||
return recerr
|
return recerr
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,5 +47,9 @@ func (to *twitteroutput) Write(str string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_, err := managetweet.Create(context.Background(), to.client, p)
|
_, err := managetweet.Create(context.Background(), to.client, p)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprint(os.Stderr, "twitter err: ")
|
||||||
|
fmt.Fprintln(os.Stderr, err)
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user