chore(debug): revert p5fiat model-list probe

Finding: /p5fiat/extern/vehicle/models IS the endpoint (de-licensed, demo:false) but
returns 'Cannot parse null string' regardless of manufacturer/make/brand param — needs
an undiscoverable param from the P5 SPA session (launchCatalog.do flow). Requires a real
PL24 web-UI network capture to resolve. Turkish Tofaş NM4/Egea is not in this catalog
anyway, so catalog-browse value is European-Fiat-only. Kept the generic P5 endpoint
self-discovery fallback. Fiat VIN-decode (European) is unaffected and still works.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-05 18:19:30 +03:00
parent ca535c6fcf
commit 67513b356a

View File

@@ -2013,38 +2013,6 @@ export class PL24Service {
const backendKey = catalogBase.replace(/^\//, "");
const modelPath = BACKEND_MODEL_PATH[backendKey] ?? "/extern/vehicle/modelfamilies";
// TEMP DEBUG (p5fiat model-list discovery): probe launchCatalog.do + candidate endpoints
if (backendKey === "p5fiat") {
const probe = async (u: string) => {
try {
const r = await fetch(`${this.baseUrl}${u}`, {
method: "GET",
headers,
signal: AbortSignal.timeout(12000),
});
const ct = r.headers.get("content-type") || "";
const body = await r.text();
return `${r.status} ct=${ct.slice(0, 20)} len=${body.length} head=${body.slice(0, 90).replace(/\s+/g, " ")}`;
} catch (e) {
return `ERR ${(e as Error).message}`;
}
};
const mp = `${catalogBase}/extern/vehicle/models?lang=tr&serviceName=${serviceName}`;
const cands = [
`${mp}&manufacturer=FIAT`,
`${mp}&manufacturer=Fiat`,
`${mp}&mfrId=FIAT`,
`${mp}&make=FIAT`,
`${mp}&brand=FIAT`,
`${mp}&catalog=FIAT`,
`${catalogBase}/extern/vehicle/modelfamilies?lang=tr&serviceName=${serviceName}&manufacturer=FIAT`,
`${catalogBase}/extern/vehicle/manufacturers?lang=tr&serviceName=${serviceName}&allMarkets=false`,
];
for (const c of cands) {
this.logger.warn(`FIAT-PROBE ${c.replace(catalogBase, "").slice(0, 48)}${await probe(c)}`);
}
}
const url = `${this.baseUrl}${catalogBase}${modelPath}?lang=${this.language}&serviceName=${serviceName}`;
const response = await fetch(url, {