github-tools / github-tools/github

Cannot read property 'status' of undefined error when there is no network

Ouverte
#439 1 commentaire 4 réactions 0 personnes assignées Voir sur GitHub
bug
Langage dominant
JavaScript
Étoiles
3.8k
Forks
809
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

When there is no network the `_request` function fails, without rejecting the Promise, which makes impossible to catch the error when using a callback.

Even though the component can't be used without the network (#388), I think would be good to handle the case.

The error:

`TypeError: Cannot read property 'status' of undefined`

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Start by locating the `_request` function and reproduce the no-network case described in the issue. Check the related context in issue #388, then ensure the failed request rejects its Promise so callback users can catch the error; done means the undefined `status` error is handled instead of escaping.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
javascript
Domaine
api
Type d'issue
Bug
Difficulté
2/5
Temps estimé
1-3 heures
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
42/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.