-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RunesReforged Optional Versions #73
Comments
This is a tricky one to follow, so I will do my best to lay out the sequence of events stating with the first failure. The process throws the expected error about requiring a version since it cannot look it up using the realms endpoint: kayn/lib/RequestClient/DDragonRequest.js Lines 47 to 53 in fe34048
This error makes its way up to the try/catch block where it calls the kayn/lib/RequestClient/DDragonRequest.js Lines 252 to 255 in fe34048
The error function then passes a kayn/lib/RequestClient/DDragonRequest.js Lines 178 to 181 in fe34048
It then errors a second time when it cannot destructure the After fiddling with it for a while, the easiest solution I could come up with was simply removing both of the try/catch blocks and letting the original error make its way back to the user. This resulted in me getting the version error that I would expect and stopped the detructuring callback from being called multiple times. If we wanted to make it actually work with an optional version we could perhaps have a fallback to use the latest version gotten from the versions endpoint. This would be useful since that was my expected behavior. |
Awesome... the Realms endpoint seems to contain the old rune/mastery versions as well.. I wonder if there is an issue that is already raised..
as well... Obviously, if we wanted a hacky implementaiton, we could just tell it to use the same version as the others, but the versions can differ, too, so that'd probably be buggy.. Here is a comment I found on Discord: I suppose we could just use the latest version, or just bubble up the error while also noting that optional versions does not work specifically for this endpoint. Note how there's no error checking here. Perhaps I can just re-throw the error (I forgot if this will get caught by an internal try/catch, so I'll check later).
|
It does get caught by your internal try/catch block. It runs that block multiple times. The first time through, you have the |
by @raitono:
I'll add some error logs later. Thank you to @raitono for the report.
The text was updated successfully, but these errors were encountered: