diff options
author | Ben Morrison <ben@gbmor.dev> | 2019-05-20 21:17:39 -0400 |
---|---|---|
committer | Ben Morrison <ben@gbmor.dev> | 2019-05-21 02:37:28 -0400 |
commit | 505c5d87d32a20d02efc5ed297a24f04e15765d6 (patch) | |
tree | e932ef392c0ab1dbb200551e348b0d24b3871f5e /http.go | |
parent | dec003b9f8bf7ed5b77c867e74dba061a9ec0c92 (diff) | |
download | getwtxt-505c5d87d32a20d02efc5ed297a24f04e15765d6.tar.gz |
apiEndpointHandler returning all users/statuses/mentions if no query present
Diffstat (limited to 'http.go')
-rw-r--r-- | http.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/http.go b/http.go index 2a733aa..4b6d460 100644 --- a/http.go +++ b/http.go @@ -43,6 +43,12 @@ func log200(r *http.Request) { log.Printf("*** %v :: 200 :: %v %v\n", uip, r.Method, r.URL) } +// log output for 400s +func log400(w http.ResponseWriter, r *http.Request, err error) { + uip := getIPFromCtx(r.Context()) + log.Printf("*** %v :: 400 :: %v %v :: %v\n", uip, r.Method, r.URL, err) +} + // log output for 404s func log404(w http.ResponseWriter, r *http.Request, err error) { |