libraries.io icon indicating copy to clipboard operation
libraries.io copied to clipboard

Include rate limit headers in 404 responses

Open calebcartwright opened this issue 2 years ago • 2 comments

Suppose this counts as a feature request, but I've observed that the API response doesn't include the rate limiting headers in not found/404 scenarios, and was curious if it would be feasible to include those response headers (x-ratelimit-limit, x-ratelimit-remaining) in the 404 scenarios as well?

e.g. compare

curl -I https://libraries.io/api/npm/not-a-real-package-anywhere/latest/dependencies 

with

curl -I https://libraries.io/api/npm/badge-maker/latest/dependencies

The 404 request definitely counts against the rate limit, and the absence of the headers is consistent regardless of whether the request is authenticated with the api_key query param.

Thanks in advance for your consideration (and the Libraries.io service!), and please let me know if more information is required and/or any of the above is unclear.

calebcartwright avatar Sep 27 '21 23:09 calebcartwright

Ron said he would have to wait for a couple more days for a new contract and he will not let us have the money to get back from him

M00NZ1R94 avatar Oct 29 '21 02:10 M00NZ1R94

Open

Samric24 avatar Jan 03 '24 02:01 Samric24