Debug of Shame: Field is Required

This night debug of shame was, react/redux hang on loading and not getting a response from the database.

During this project, I was building a page to add a form to add education to a user profile, just had the same done with add experience just fine. This new React component had the same structure internally with just a few different field names.

When the submit was sent nothing happened, the page stuck there for about a minute then react dev responded saying something was undefined.

The back end was not reporting any error. How I got it fixed was:

By the Redux dev tools extension, I found out that the state was reporting a change in the state saying that the fieldOfStudy was required. While this camp was not required in the front end React, it was in the backend API, I renamed every ooccurrenceof this field in the front end component and done, it was fixed.

Now I have a TODO, learn how to handle this kind of error better.



Leave a Reply

Your email address will not be published. Required fields are marked *