Unable to add / update restaurant reviews

Hey there, I am doing the new MERN Stack Course of restaurant reviews.
Till now, I haven’t made it serverless yet.
When trying to add a review (logged in), and then click on submit, it shows that it was successful, however, it doesn’t show up on the frontend. When checked in the collections in MongoDB, under the reviews, it shows:

_id: ObjectId('635102f6f99e930c65921e72')

Also, I can’t update an existing review (logged in as that user). It throws the following error in the console:

AxiosErrorcode: "ERR_BAD_RESPONSE"config: {transitional: {…}, transformRequest: Array(1), transformResponse: Array(1), timeout: 0, adapter: ƒ, …}message: "Request failed with status code 500"name: "AxiosError"request: XMLHttpRequest {onreadystatechange: null, readyState: 4, timeout: 0, withCredentials: false, upload: XMLHttpRequestUpload, …}response: {data: {…}, status: 500, statusText: 'Internal Server Error', headers: AxiosHeaders, config: {…}, …}stack: "AxiosError: Request failed with status code 500\n    at settle (http://localhost:3000/static/js/bundle.js:48712:12)\n    at XMLHttpRequest.onloadend (http://localhost:3000/static/js/bundle.js:47452:66)"[[Prototype]]: Error

What can be the fix for this? github repo: GitHub - sohamdata/restaurant-reviews

post in the Backend subforum

I think this forum is reserved for the basic JavaScript algorithms and data structures section, if you want answers I suggest you post your question in the Backend development sub forum, I think you will get more replies there

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.