Clean up some error texts
This commit is contained in:
parent
877a87e21d
commit
1453faa2f9
|
|
@ -341,7 +341,7 @@ func performCommands(sub microsub.Microsub, commands []string) {
|
||||||
u := commands[2]
|
u := commands[2]
|
||||||
_, err := sub.FollowURL(uid, u)
|
_, err := sub.FollowURL(uid, u)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("An error occurred: %s\n", err)
|
log.Fatalf("ERROR: %s", err)
|
||||||
}
|
}
|
||||||
// NOTE(peter): should we show the returned feed here?
|
// NOTE(peter): should we show the returned feed here?
|
||||||
}
|
}
|
||||||
|
|
@ -488,7 +488,7 @@ func importJsonIntoMicrosub(sub microsub.Microsub, filename string) {
|
||||||
|
|
||||||
feeds, err := sub.FollowGetList(uid)
|
feeds, err := sub.FollowGetList(uid)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("An error occurred: %q\n", err)
|
log.Fatalf("An error occurred: %s\n", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, f := range feeds {
|
for _, f := range feeds {
|
||||||
|
|
@ -500,7 +500,7 @@ func importJsonIntoMicrosub(sub microsub.Microsub, filename string) {
|
||||||
if _, e := feedMap[string(feed)]; !e {
|
if _, e := feedMap[string(feed)]; !e {
|
||||||
_, err := sub.FollowURL(uid, string(feed))
|
_, err := sub.FollowURL(uid, string(feed))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("An error occurred: %q\n", err)
|
log.Printf("An error occurred: %s\n", err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
log.Printf("Feed followed: %s\n", string(feed))
|
log.Printf("Feed followed: %s\n", string(feed))
|
||||||
|
|
|
||||||
|
|
@ -695,7 +695,7 @@ func Fetch2(fetchURL string) (*http.Response, error) {
|
||||||
client := http.Client{}
|
client := http.Client{}
|
||||||
resp, err := client.Do(req)
|
resp, err := client.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error while fetching %s: %s", u, err)
|
return nil, fmt.Errorf("fetch failed: %s", u, err)
|
||||||
}
|
}
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user