-
Notifications
You must be signed in to change notification settings - Fork 13
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
Améliorer affichage sur erreur 521 quand 401 ou 403 #301
Comments
Hello @vvatelot , Je suis pas sûr de bien comprendre l'évolution ici : il faut afficher un message d'erreur spécifique lorsque l'API répond 401 ou 403, c'est bien ça ? |
En fait, l'explication complète c'est que l'API renvoit un code 521 (code non standard qui décrit qu'il y a eu un problème côté serveur lors de l'analyse) et dans la réponse, on a le détail avec le code réellement renvoyé par la page analysée. Exemple:
{
"id": "19f0efc4-a54c-4f48-921a-54acbd6f7225",
"status": "SUCCESS",
"ecoindex_result": {
"status": "FAILURE",
"detail": null,
"error": {
"detail": {
"status": 403
},
"exception": "EcoindexStatusError",
"message": "",
"status_code": 521,
"url": "https://www.manomano.fr/"
}
},
"task_error": null
} Ce qui se traduit comme ça:
|
EcoIndex/assets/js/components/EcoIndexDialog.js
Line 11 in 73797d0
The text was updated successfully, but these errors were encountered: