iamtheyammer / fetch-ford-service-manuals

Downloads HTML and PDF versions of Ford Service Manuals from PTS
GNU General Public License v3.0
32 stars 12 forks source link

Error: Request failed with status code 500 #10

Closed KarelVenter closed 9 months ago

KarelVenter commented 10 months ago

Hi. First off, MANY THANKS for this. VERY VERY handy.

The script downloaded the Manual successfully but when attempting to download the Wiring Manual I get the error above.

I commented out the section to download the Manual in index.ts to retry just the Wiring Manual download. Also carefully redid the instructions (changed params.json values, pasted API key into cookieString.txt) and tried again only to get the same error.

Here is a dump for the full output Error 500 dump.txt

Any guidance?

mikef187 commented 9 months ago

I also got the error 500 issue, but that is actually coming from the FORD server. I just reran the script and it finished.

iamtheyammer commented 9 months ago

Based on the output that @KarelVenter sent, it looks like it might have just been a temporary error on Ford’s end— I hope you tried again and it worked like @mikef187.

iamtheyammer commented 9 months ago

I’m going to close this issue assuming so but if not feel free to reply, which will re-open it.

danricho commented 3 months ago

I had this same issue during the wiring download. I tracked it down to not being able to get a specific SVG... so I wrapped the getter in a try catch to let the rest work. Quick and dirty but I can live with it.

try {  
  const req = await client({
    method: "GET",
    url: `https://www.fordservicecontent.dealerconnection.com/ford_content/PublicationRuntimeRefreshPTS/wiring/svg/${environment}/${vehicleId}/~W${wiringBookCode}/${languageCode}/svg/${docNumber}/0/${parseInt(
      pageNumber
    )}.svg`,
    params: {
      fromPageBase: "https://www.fordtechservice.dealerconnection.com",
    },
  });

  return req.data;
} catch (error: any) { return ""; }