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:
Markus
2026-09-01 21:38:48 +02:00
parent 57832d5e86
commit 3518fc2cb0
2 changed files with 68 additions and 1 deletions
+11
View File
@@ -0,0 +1,11 @@
{
"version": "0.0.1",
"configurations": [
{
"name": "bb-apartment-dev",
"runtimeExecutable": "npm",
"runtimeArgs": ["run", "dev"],
"port": 3000
}
]
}