diff options
author | Ben Morrison <ben@gbmor.dev> | 2019-05-31 01:16:20 -0400 |
---|---|---|
committer | Ben Morrison <ben@gbmor.dev> | 2019-05-31 01:16:20 -0400 |
commit | d8e4c8a098539a81307900bf188fa6fe628e43b0 (patch) | |
tree | 0552f0cac921a80625ad5d2c1fae8efc7b592315 | |
parent | ce36f822777f2b642fcec7249d8df72ab86c0aa7 (diff) | |
download | getwtxt-d8e4c8a098539a81307900bf188fa6fe628e43b0.tar.gz |
added context to 400 errors
-rw-r--r-- | post.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/post.go b/post.go index 21b3286..d6da21f 100644 --- a/post.go +++ b/post.go @@ -30,7 +30,7 @@ func apiPostUser(w http.ResponseWriter, r *http.Request) { out, remoteRegistry, err := registry.GetTwtxt(urls) if err != nil { - log400(w, r, err.Error()) + log400(w, r, "Error Fetching twtxt Data: "+err.Error()) return } @@ -40,7 +40,7 @@ func apiPostUser(w http.ResponseWriter, r *http.Request) { remoteRegistries.Mu.Unlock() if err := twtxtCache.CrawlRemoteRegistry(urls); err != nil { - log400(w, r, err.Error()) + log400(w, r, "Error Crawling Remote Registry: "+err.Error()) return } log200(r) @@ -49,12 +49,12 @@ func apiPostUser(w http.ResponseWriter, r *http.Request) { statuses, err := registry.ParseUserTwtxt(out, nick, urls) if err != nil { - log400(w, r, err.Error()) + log400(w, r, "Error Parsing twtxt Data: "+err.Error()) return } if err := twtxtCache.AddUser(nick, urls, uip, statuses); err != nil { - log400(w, r, err.Error()) + log400(w, r, "Error Adding User to Cache: "+err.Error()) return } |