Fix Beds24 429 errors by tracking real rate-limit budget from response headers.
Beds24 caps each account at ~100 credits per rolling 5-minute window rather than limiting concurrency, and a single houses-page search across 8 apartments (availability + min-stay probing) can burn through that budget in one page load. Retrying with backoff doesn't help since the window can take minutes to refill, so we now track the last known remaining budget per house and fail fast to the existing fallback logic once it's exhausted, instead of hammering the API with requests that will just 429. Also fixes a stray let->const ESLint warning in getAvailabilityInChunks.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"version": "0.0.1",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "bb-apartment-dev",
|
||||
"runtimeExecutable": "npm",
|
||||
"runtimeArgs": ["run", "dev"],
|
||||
"port": 3000
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user