Improve errors

This commit is contained in:
Peter Stuifzand 2018-03-28 02:20:25 +02:00
parent 7b867434f6
commit 6abae3be07

View File

@ -253,6 +253,8 @@ func (h *microsubHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
jw.Encode(map[string][]microsub.Feed{ jw.Encode(map[string][]microsub.Feed{
"items": following, "items": following,
}) })
} else {
log.Printf("unknown action %s\n", action)
} }
return return
} else if r.Method == http.MethodPost { } else if r.Method == http.MethodPost {
@ -319,10 +321,12 @@ func (h *microsubHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
log.Println("timeline mark_read value not found") log.Println("timeline mark_read value not found")
} }
} else { } else {
log.Println("unknown method in timeline %s") log.Printf("unknown method in timeline %s\n", method)
} }
w.Header().Add("Content-Type", "application/json") w.Header().Add("Content-Type", "application/json")
fmt.Fprintln(w, "[]") fmt.Fprintln(w, "[]")
} else {
log.Printf("unknown action %s\n", action)
} }
return return