-
Notifications
You must be signed in to change notification settings - Fork 50
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
Throw error of unrecognized type
in .auth({ type })
#216
Comments
Hi @gr2m Taking a look into this. Trying to reproduce it with TypeScript, the compiler complains about it: Do you have more details on how to reproduce this? |
I'd like to throw an Error in the code, and not rely on the TypeScript definitions. hen using the auth strategy with Octokit, the |
Drafted this PR (#249) but at TS level does not have much sense since an invalid type is impossible to reach when using Checking at
And checking at Lines 141 to 144 in f008655
Not sure how to proceed here:
|
That is a known limitation right now. See octokit/core.js#32 and https://github.com/octokit/rest.js/issues/1562#issuecomment-582678977. It comes back to the idea of having a global |
🎉 This issue has been resolved in version 2.11.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I just spend a significant amount of time debugging a problem that was ultimately caused by a space after
"installation "
:We should throw an error if a
type
is passed that is unknown. Otherwise it currently falls back tooauth
, which is not what we want.The text was updated successfully, but these errors were encountered: