github-tools / github-tools/github
Unhandled promise rejection when using Repository.isCollaborator()
- Lenguaje dominante
- JavaScript
- Estrellas
- 3.8k
- Forks
- 809
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript
- Área
- api
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 42/100