Comments (1)
PROBLEM:
When trying to load a nonexisting list, the system displays a technical error message on the Web page.
The purpose of this task is to get a more user-friendly message.
ANALYSIS
My understanding of the code workflow is that:
- In the MockDatastoreClient class from todo-service, the BDD response is simulated, so error messages are generated when the list does not exist, for example.
- In ToDoService class from todo-service, the different action methods catch the errors and convert them to RuntimeException before sending them to BFF layer.
- In MyErrorHandler class from BFF, we handle and format errors before sending them to the front end.
In the handle method, the system use .toSting() to format the JSON error before sending it that is why we see all the error attributes as type and message displayed on the Web page.
SOLUTION
So I propose reviewing the MyErrorHandler class to extract expected information before sending the error label to the front end. See my change in the following fork:
https://github.com/tudiapason/todo-list-fullstack/tree/main
MANUAL TESTS
- FUNCTIONAL TEST:
- Try to load a nonexistent list: New error message is displayed (See 20230501_MSG_NoSuchList.jpg(
- REGRESSION TEST:
- Try to load the list with the field empty: Previous message still displayed (See 20230501_MSG_NoValuePresent.jpg)
AUTOMATED TESTS
IN PROGRESS
from todo-list-fullstack.
Related Issues (9)
- Make Server Status nice to look at HOT 1
- Save/Load ToDo list by name HOT 4
- Increase testautomation coverage
- supertest script for when the list already exists
- serenity rest script for when the list already exists
- saving the list locks save button
- can't update a list, get error "already exists"
- Save and load per user
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from todo-list-fullstack.