question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Show notifications for failed backend project submission

See original GitHub issue

Currently 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:open
  • Created 4 years ago
  • Reactions:1
  • Comments:16 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
ShaunSHamiltoncommented, Jan 5, 2021

@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?

0reactions
shootermvcommented, Jul 1, 2022

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” modal
modal 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

      const updatePromise = new Promise((resolve, reject) => {
        return reject("my Name is Jovanny Georgio")
        /*user.updateAttributes(updateData, err => {
          if (err) {
            return reject(err);
          }
          return resolve();
        })*/
     });
Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't submit backend project · Issue #37381 - GitHub
When a backend project is submitted it does not send the solution or Github urls and is rejected, silently, by the server.
Read more >
Whether all error messages should come from the backend in ...
So my backend developer sends me error messages that are not suitable for output to an alert arguing that the message is I...
Read more >
Notification emails - GitLab Docs
In the top-right corner, select your avatar. Select Preferences. On the left sidebar, select Notifications. Locate the project in the Projects section. Select ......
Read more >
How to Write Helpful Error Messages to Improve Your App's ...
Having useful error messages can go a long way toward making a frustrating scenario for an end-user as pleasant as possible.
Read more >
How to make clear & pretty error messages from the Go ...
Model to validate. Imagine we need to implement backend validation of incoming data from POST request to REST API endpoint of new project...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found