fix(eterra): increase default timeout 40s -> 120s for large geometry pages

- DEFAULT_TIMEOUT_MS: 40_000 -> 120_000 (1000 features with full geometry
  from Feleacu regularly exceed 40s on the eTerra server)
- Add timeoutMs option to syncLayer() for caller override
- syncLayer now passes timeoutMs through to EterraClient.create()

Fixes 'timeout of 40000ms exceeded' on TERENURI_ACTIVE sync.
This commit is contained in:
AI Assistant
2026-03-08 03:31:18 +02:00
parent d7d78c0cc1
commit 8bb4a47ac5
2 changed files with 6 additions and 2 deletions
@@ -59,7 +59,7 @@ type ProgressCallback = (downloaded: number, total?: number) => void;
const BASE_URL = "https://eterra.ancpi.ro/eterra";
const LOGIN_URL = `${BASE_URL}/api/authentication`;
const DEFAULT_TIMEOUT_MS = 40_000;
const DEFAULT_TIMEOUT_MS = 120_000;
const DEFAULT_PAGE_SIZE = 1000;
const PAGE_SIZE_FALLBACKS = [500, 200];
const MAX_RETRIES = 2;