debugging: submit project, delete project, submit project #7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.```