Skip to content

Create User: Fix 500 Server Error and 400 Server Error #1

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

Merged
merged 3 commits into from
Nov 28, 2023

Conversation

SevanBadal
Copy link
Contributor

@SevanBadal SevanBadal commented Nov 28, 2023

Issue

  • Client component causing a server side crash (500 error) due to react-simplemde-editor import
  • Server returning 400 response due to mismatch in object key spelling

Solution

  • Used a dynamic import for react-simplemde-editor heavily motived by this issue response on Github
  • Fixed object key spelling in the API Route

Additional Info

-Instead of routing the user back to the same page after request completion, I call the reset function provided by the useForm hook to reset the form state

  • Finally, I added a universal pattern for .env in the .gitignore to keep env files untracked

@saro9588 saro9588 merged commit 2b2ce19 into saro9588:main Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants