-
Notifications
You must be signed in to change notification settings - Fork 12
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
Handle API errors on the frontend #152
Comments
@rodmaia, I ran through the entire API to catalog all the errors. @luderibeiro helped me to create a document containing all the errors and their causes. Where can I add this document? Is it desirable that the wiki or readme contains this info? And about the changes in app behaviour, what is the extension of them? |
|
Good job! Accidentally, you did part the job of #48.
The wiki should be a good place for this. As this is very specific to the API, we should use the wiki on the API repo.
Pretty big eh? The first step should be to review the frontend to see if all cases are covered. Then open issues for the cases not covered. I suppose that none of the 404 errors are covered. |
he API errors are Handled and the user receives a feedback about what went wrong.
@rodmaia Thank you! I appreciate it! I noticed that it was related, but decided to do it anyway. Hope it helps and contribute somehow.
Ok, I will send it there then.
I tried to cover the errors mentioned above. Now the user receives and alert with an information about what went wrong. How front-end is under validation, I dont think other erros beyond those can happen. But just in case, I also added a default error message to the user. |
It sure will!
Be sure to add everything to the BotFlow API wiki before closing this issue
A few moments ago I tried running the code on the #152-HandleApiErrors branch while the API was down and I got an error "Unhandled Rejection (TypeError): Cannot read property 'status' of undefined". You might want to double check everything. |
@rodmaia About adding this table to the Botflow API Wiki, I went to the API repository, but couldnt find anything on its wiki. Actually, it doesnt exists. Do you want me to add it to the README file? Or where should I add it? |
Hey @Miguel-Alves! This issue seems trickier than we anticipated 😫. I tested the changes you made and they work nicely at first glance: I dropped the API and got the error pop-up. However, when you press OK the app is still available so I navigated to "add story", got a few more pop-ups then the app crashed. After you fix that, we should probably handle these errors more gracefully. Either by having a new destination or by disabling all navigational elements on screen. In any case, I will open a new issue for that stuff so we can have some closure here. As for the wiki, you can edit this page and put all the documentation there. |
The API handles errors on all operations (see #42). Those errors need to be handled appropriately on the frontend so people understand why things failed and how they can recover.
Keep in mind that the API and BotFlow are separate projects so they can evolve separately. Proper communication and error handling should be enforced by the code, not by product management.
See also #48
Tasks
Acceptance criteria
The text was updated successfully, but these errors were encountered: