github-tools / github-tools/github

Unhandled promise rejection when using Repository.isCollaborator()

オープン
#629 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
3.8k
フォーク
809
PR マージ指標
30日以内にマージされた PR はありません

説明

When calling Repository.isCollaborator(), the a _UnhandledPromiseRejectionWarning: Error: 404 error making request get https://api.github.com/repos/org/repo/collaborators/xxx: "Not Found"_ is thrown when a user is not a collaborator, instead of returning false, and if the user is a collaborator, the request object is returned with blank data field. Based on the documentation, the promise should resolve to a boolean, but this doesn't seem to be the case with how actual behaviour.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Start at the Repository.isCollaborator() entry point and reproduce both cases described against the GitHub collaborators endpoint: a non-collaborator and a collaborator. Compare the observed promise result with the documented boolean behavior; done means both cases resolve to the expected boolean without an unhandled rejection.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
api
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。