Current games issue
See original GitHub issueIssue Description
const nombre = args.slice([1]).join(' ');
const nombreUrl = nombre.replace(/\s/g, "%20").toLowerCase();
const summoner = await kayn.Summoner.by.name(nombre)
let game = await kayn.CurrentGame.by.summonerID(summoner.id) // awaiting doesn't solve it
console.log(typeof(game));
When trying to see the type of variable game
if there is no current games for the Summoner, instead of the 404 object, the console returns an “Unhandled promise rejection” and I can’t reassign it nor see it’s type. Is this an issue or am I doing it wrong?
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Popular Games Right Now - Gaming | Downdetector
Popular Games Right Now · Madden · Steam · Roblox · Origin · Call of Duty · Champions Legion · Playstation Network ·...
Read more >Issues - Games World of Puzzles
In this October issue of GAMES WORLD OF PUZZLES, you'll find plenty of tricks and treats. Tricks, of course, because what fun is...
Read more >Xbox Status - Xbox Support
Check the Xbox services, games, and apps for any service outages. ... Did this resolve your issue? Yes No. Problem with a game?...
Read more >Epic Games Public Status
Welcome to Epic Games Public's home for real-time and historical data on system performance. ... Investigating - We are currently investigating this issue....
Read more >7 Major Problems of Modern Video Games
7 Major Problems of Modern Video Games · 1. Plots That Have No Moral Base · 2. Glitches · 3. Baseless Segmentation of...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ohhh, I haven’t been reading carefully. you can try this:
Basically, if there’s a 404, just reassign
null
, otherwise if it’s some other error that mean something really bad happened (assuming retries are on), so just throw.If you place it inside the
try
block, the whole try statement will run from start-to-finish unless an error occurs. So you’ll be able to catch 404’s, 500’s, etc of bothSummoner
andCurrentGame
. Not sure about the scoping part, but IMO if the logic is “combined”, then put it all in onetry
block.I would put it in there personally, unless you want specific error-handling on a case-by-case basis.