achievements-app / psn-api

A JavaScript library that lets you get trophy, user, and game data from the PlayStation Network.
https://psn-api.achievements.app
MIT License
263 stars 31 forks source link

Resource not found error #164

Closed nazarii-semeniuk closed 3 months ago

nazarii-semeniuk commented 3 months ago

Hi, I've started to receive this error today - "Resource not found". Looks like Sony have changed something in their API. Error occurs when I'm trying to call getUserTrophiesEarnedForTitle for Ghost of Tsushima (npcommunicationId is NPWR22859_00).

I decided to dig deeper, and found out that game's trophyTitlePlatform is "PS5,PSPC", so looks like "PSPC" platform was added. Can I receive this error because of this new platform value?

wescopeland commented 3 months ago

Hi @nazarii-semeniuk ,

Do you experience this error only with Ghost of Tsushima, or with all titles when using the function?

nazarii-semeniuk commented 3 months ago

Only with Ghost of Tsushima, other games that I have in my profile works great.

nazarii-semeniuk commented 3 months ago

I'm so sorry, that I've disturbed you @wescopeland , it was my fault. I had a check in my code if game platform is equals 'PS5'. If no, I'm adding { npServiceName: "trophy" }param to get info for olders games. Obviously, this new "PS5,PSPC" was failing this check, and I was adding { npServiceName: "trophy" }param.

I decided that it was lib's fault because it was working for a year now, and then just suddenly started to fail.

Thank you for what you're doing. Lib is great :D

wescopeland commented 3 months ago

@nazarii-semeniuk No worries at all! Thank you for the follow-up and explanation!