mirror of
https://github.com/vkaelin/LeagueStats.git
synced 2026-03-25 12:57:28 +00:00
fix: log summoner puuid when riot match endpoint returns a 404
This commit is contained in:
parent
16a8f2503a
commit
abab481f8d
1 changed files with 3 additions and 7 deletions
|
|
@ -110,19 +110,15 @@ class MatchService {
|
|||
|
||||
/* If we have to store some matches in the db */
|
||||
if (matchesFromApi.length !== 0) {
|
||||
const ctx = {
|
||||
account,
|
||||
}
|
||||
|
||||
// Try to see why matches are sometimes undefined
|
||||
matchesFromApi.filter(m => {
|
||||
if (m === undefined) {
|
||||
Logger.transport('file').info('Match undefined', matchesToGetFromRiot)
|
||||
Logger.transport('file').info(`Match undefined, summoner: ${summonerDB.puuid}`, m)
|
||||
}
|
||||
})
|
||||
|
||||
// Transform raw matches data
|
||||
await BasicMatchTransformer.transform(matchesFromApi, ctx)
|
||||
await BasicMatchTransformer.transform(matchesFromApi, { account })
|
||||
|
||||
/* Save all matches from Riot Api in db */
|
||||
for (const match of matchesFromApi) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue