Show notifications for failed backend project submission
See original GitHub issueCurrently when a backend project submission fails, the users are only notified by a brief warning message saying that the server is not being updated and the user is navigated to the next challenge. as illustrated here https://github.com/freeCodeCamp/freeCodeCamp/issues/37381#issuecomment-544185610
to reproduce:
to make the backend projects submission fail, please add
componentDidUpdate() {
this.props.updateSolutionForm({});
}
below the following block https://github.com/freeCodeCamp/freeCodeCamp/blob/d01ce3bbc11fb0736ed3ad81e8565c6d23c342b9/client/src/templates/Challenges/projects/SolutionForm.js#L30
Additionally this #37494 handles the api side of the message on submission failure, so a JSON should be send to the client upon failure.
expected behavior:
the user should see the message that was sent from the api-server and not be navigated to the next challenge.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:16 (15 by maintainers)
Top GitHub Comments
@ahmadabdolsaheb I would be happy to help on this. Should I update on of my PRs touching this, or open a new PR for it?
so, after reading, and understanding more about this issue, i will try to summarize things i found out so far: the bug happens when there is some problem with api server (error at request), and user trying to submit back-end challenge.
the bug is(current behavior) - that when user presses
submit and go to next challenge
button at “success” modalmodal is closed and user navigated to next challenge
the desired behavior is - modal should close, but no navigation should occur, instead a warning message about server failure
should be seen
if i correct - the situation can be reproduced by placing following code at
api-server\src\server\boot\challenge.js
line 418