Skip to content
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

debugging: submit project, delete project, submit project #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

trollic
Copy link
Collaborator

@trollic trollic commented Jul 30, 2022

deleting project causes user.project_id to be null. BUT when trying to resubmit, this causes problems because the null project_id is transfered to backend, which causes a 422 error as below. this PR has a tweak which makes user.project_id be "" upon delete, which changed the backend error message to be more informative. But it still doesn't work - the api call changed to api/edit_project instead and had an error message You have not submitted a project.. This is more informative than the undefined error message in master with the api api/submit_project. Clearly there is a reliance on null in the frontend that hasn't been fixed in the logic somewhere....

OPTIONS /api/submit_project/:
=> Error: No matching routes for OPTIONS /api/submit_project/.
=> Warning: Responding with 404 Not Found catcher.
=> CORS Fairing: Turned missing route OPTIONS /api/submit_project/ into an OPTIONS pre-flight request
=> Response succeeded.
POST /api/submit_project/ application/json:
=> Matched: POST /api/submit_project application/json (submit_project)
=> Error: Couldn't parse JSON body: Error("missing field category", line: 1, column: 151)
=> Outcome: Failure
=> Warning: Responding with 422 Unprocessable Entity catcher.
=> Response succeeded.```

@trollic
Copy link
Collaborator Author

trollic commented Jul 30, 2022

okay changing the filter in callEditProject seems to work? but obviously the logic is still wrong because when you delete project, it still be submit_project which is called, not edit_project

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.

1 participant