Clean up some error texts

This commit is contained in:
Peter Stuifzand 2018-12-29 20:29:56 +01:00
parent 877a87e21d
commit 1453faa2f9
Signed by: peter
GPG Key ID: 374322D56E5209E8
2 changed files with 4 additions and 4 deletions

View File

@ -341,7 +341,7 @@ func performCommands(sub microsub.Microsub, commands []string) {
u := commands[2]
_, err := sub.FollowURL(uid, u)
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?
}
@ -488,7 +488,7 @@ func importJsonIntoMicrosub(sub microsub.Microsub, filename string) {
feeds, err := sub.FollowGetList(uid)
if err != nil {
log.Fatalf("An error occurred: %q\n", err)
log.Fatalf("An error occurred: %s\n", err)
}
for _, f := range feeds {
@ -500,7 +500,7 @@ func importJsonIntoMicrosub(sub microsub.Microsub, filename string) {
if _, e := feedMap[string(feed)]; !e {
_, err := sub.FollowURL(uid, string(feed))
if err != nil {
log.Printf("An error occurred: %q\n", err)
log.Printf("An error occurred: %s\n", err)
continue
}
log.Printf("Feed followed: %s\n", string(feed))

View File

@ -695,7 +695,7 @@ func Fetch2(fetchURL string) (*http.Response, error) {
client := http.Client{}
resp, err := client.Do(req)
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()