chore(debug): TEMP log Ford 0-groups HTML + Volvo model-years raw (revert after diag)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1551,6 +1551,11 @@ export class PL24FordLegacyService {
|
||||
const raw = await this.fetchP4Page(url, serviceName, true);
|
||||
if (!raw) return { modelYears: [], engines: [], gearboxes: [] };
|
||||
|
||||
// TEMP DEBUG: classify Polestar 0-modelYears (upstream-empty vs parse vs param)
|
||||
this.logger.warn(
|
||||
`Volvo DEBUG ${serviceName} mdl=${mdlId}: rawLen=${raw.length} head=${raw.replace(/\s+/g, " ").slice(0, 300)}`,
|
||||
);
|
||||
|
||||
let modelYears: { code: string; name: string }[] = [];
|
||||
try {
|
||||
const parsed = JSON.parse(raw) as {
|
||||
@@ -1788,6 +1793,14 @@ export class PL24FordLegacyService {
|
||||
this.logger.log(
|
||||
`Ford: ${groups.length} groups for ${serviceName}/${familyId} catCode=${catCode ?? "none"} arch=${arch}`,
|
||||
);
|
||||
if (groups.length === 0) {
|
||||
// TEMP DEBUG: dump HTML shape to classify upstream-empty vs parse-miss vs param-bug
|
||||
const rows = (html.match(/tc-data-row/g) || []).length;
|
||||
const titleM = html.match(/<title>([^<]*)<\/title>/i);
|
||||
this.logger.warn(
|
||||
`Ford DEBUG ${serviceName}/${familyId} cc=${catCode}: htmlLen=${html.length} tcRows=${rows} title="${titleM?.[1] || "-"}" head=${html.replace(/\s+/g, " ").slice(0, 300)}`,
|
||||
);
|
||||
}
|
||||
|
||||
if (groups.length > 0) {
|
||||
await this.redis.setJson(cacheKey, groups, 7200);
|
||||
|
||||
Reference in New Issue
Block a user