Fix: Fix typescript client#288
Open
SnowSuno wants to merge 2 commits into
Open
Conversation
summary: - Add missing type definitions - Minor changes to error handling behavior breaking changes: - _postData(): Throw UNKNOWN_ERROR when caught error is not type of AxiosError - getUserInfo(): Bubble error instead of returning it directly
injoonH
reviewed
May 8, 2022
| private readonly DOMAIN: string; | ||
|
|
||
| constructor(clientId, secretKey, isBeta = false, serverAddr = "") { | ||
| constructor(clientId: string, secretKey: string, isBeta = false, serverAddr = "") { |
Member
Author
There was a problem hiding this comment.
default value를 이와 같이 주면 각각 boolean, string으로 type inference가 되어서 타입 명시는 안 해줬던 것 같네요.
명시적으로 적어주는 것도 나쁘지 않을 것 같긴 해요
| throw new Error("NO_PERMISSION"); | ||
| } else if (err.response.status !== 200) { | ||
| throw new Error("UNKNOWN_ERROR"); | ||
| if (err instanceof AxiosError) { |
Co-authored-by: Injoon Hwang <[email protected]>
Member
Author
|
후후 1년만에 답글달기 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
summary:
breaking changes: