Skip to content

Commit eb231ac

Browse files
Merge pull request #212 from m-lab/sandbox-roberto-fix-rl
Fix nil pointer in Nearest handler
2 parents f61c2ea + 4acbf0c commit eb231ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

handler/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ func (c *Client) Nearest(rw http.ResponseWriter, req *http.Request) {
176176
log.Printf("Rate limiter error: %v", err)
177177
} else if limited {
178178
metrics.RequestsTotal.WithLabelValues("nearest", "rate limit",
179-
http.StatusText(result.Error.Status)).Inc()
179+
http.StatusText(http.StatusTooManyRequests)).Inc()
180180
// For now, we only log the rate limit exceeded message.
181181
// TODO: Actually block the request and return an appropriate HTTP error
182182
// code and message.

0 commit comments

Comments
 (0)