Senither / hypixel-skyblock-facade

A stateless API facade for the Hypixel SkyBlock API
https://hypixel-api.senither.com/
MIT License
17 stars 25 forks source link

Status Code: 500 #5

Closed Calvahar closed 3 years ago

Calvahar commented 3 years ago

Fetching: https://hypixel-api.senither.com/v1/profiles/5ffcaa7b404a48e983e89c80b5ee1b2c/weight?key=${API_KEY}


Returns:

{
   "status": 500,
   "reason": "Cannot read property 'xp' of undefined",
   "stack": [
      "TypeError: Cannot read property 'xp' of undefined",
      "    at SlayersGenerator.generateSlayerStatsResponse (/root/hypixel-skyblock-facade/build/generators/SlayersGenerator.js:87:35)",
      "    at SlayersGenerator.build (/root/hypixel-skyblock-facade/build/generators/SlayersGenerator.js:44:33)",
      "    at Object.parseSkyBlockProfiles (/root/hypixel-skyblock-facade/build/utils/Hypixel.js:99:49)",
      "    at /root/hypixel-skyblock-facade/build/routes/v1/GetProfileWithStrategy.js:9:30",
      "    at runMicrotasks (<anonymous>)",
      "    at processTicksAndRejections (internal/process/task_queues.js:93:5)"
   ]
}

Because:

Hypixel Public API, for this profile, only returns:

"slayer_bosses": {
"zombie": {}
}

Normal profiles usually return:

"slayer_bosses": {
"wolf": {},
"zombie": {},
"spider": {}
}
Senither commented 3 years ago

It's fixed now, thanks for reporting the bug 👍