1
0
Fork 0
mirror of https://github.com/alice-lg/birdwatcher.git synced 2025-03-09 00:00:05 +01:00

send too many requests on rate limit reached

This commit is contained in:
hellerve 2016-12-09 12:04:08 +01:00
parent f680b6e842
commit d9ad314d16

View file

@ -15,6 +15,10 @@ func Endpoint(wrapped func(httprouter.Params) (bird.Parsed, bool)) httprouter.Ha
res := make(map[string]interface{})
ret, from_cache := wrapped(ps)
if ret == nil {
w.WriteHeader(http.StatusTooManyRequests)
return
}
res["api"] = GetApiInfo(from_cache)
for k, v := range ret {