fix(pl24): pass Ford VIN BOM detail URL through fetchP4Page baseUrl prefix
fetchFordVinBomParts was forwarding the relative HTML jsonUrl with isFullUrl=true, which made undici try to parse \`/ford/fordp_parts/…\` as an absolute URL and throw "Failed to parse URL" for every PNC row. The Hyundai BOM expander next door calls fetchP4Page with the default isFullUrl=false (relative path) — match that. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2411,7 +2411,10 @@ export class PL24FordLegacyService {
|
||||
const parts: PL24Part[] = [];
|
||||
for (const row of rows) {
|
||||
try {
|
||||
const jsonStr = await this.fetchP4Page(row.jsonUrl, serviceName, true);
|
||||
// row.jsonUrl is the relative path captured from the BOM HTML
|
||||
// (e.g. /ford/fordp_parts/json-vin-bom-detail.action?...) — let
|
||||
// fetchP4Page prefix the baseUrl, same as the Hyundai BOM expander.
|
||||
const jsonStr = await this.fetchP4Page(row.jsonUrl, serviceName);
|
||||
if (!jsonStr) continue;
|
||||
const data = JSON.parse(jsonStr) as {
|
||||
details?: {
|
||||
|
||||
Reference in New Issue
Block a user