-
Notifications
You must be signed in to change notification settings - Fork 19
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
Properly reject the promise in client initialisation #167
Properly reject the promise in client initialisation #167
Conversation
looks good. this should fix #14 (reply in thread) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good in general. just added some notes for the ClientOptions
type
src/Client.ts
Outdated
@@ -148,7 +148,7 @@ export class Client { | |||
* @example const client = await Client.create({ token: "token" }); | |||
*/ | |||
public static create(options: Omit<ClientOptions, 'onReady'>): Promise<Client> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should probably also omit onFail
like: Omit<ClientOptions, 'onReady' | 'onFail'>
ccdb2cc
to
96b01f6
Compare
The changes have been update in v9.2.5. If you encounter any bugs, open a new issue to resolve it. Thanks for your support 👍 ! |
hey :D
this could actually happen, because Client.fetch could throw a
SpotifyAPIError exception, which is not caught.
…On 2022-11-11 12:55, TheSudarsanDev wrote:
@Arakmar [1], By the way, i don't think, there are any possible ways
to get any error at client._init as it is protected by try and catch
in client.fetch itself. Have you ever encountered an error despite the
try and catch?
--
Reply to this email directly, view it on GitHub [2], or unsubscribe
[3].
You are receiving this because you commented.Message ID:
***@***.***>
Links:
------
[1] https://github.com/Arakmar
[2]
#167 (comment)
[3]
https://github.com/notifications/unsubscribe-auth/AJCZQF7NCKXLOQBNOTVT25DWHY63VANCNFSM56PQ66GQ
|
Just now, noticed it. |
Changes
In case of an authentication error or an API outage during client initialisation, it's not possible to catch the error.
Status