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

I saw another post like this( Restaurant review won't get updated - #2 by Mohamed-Magdey), however the solution in it didn’t work for me.
What can be the fix for this? github repo: GitHub - sohamdata/restaurant-reviews

It’s totally different situation and as you got 500 Internal Server Error your server works well but you need to take some time to debug why text and user_id values are null.

There’s a bug in Beau Carnes’s code. In the frontend, the http-common.js file has a typo error in the axios.create() method. Headers is specified as “Content-type”: instead of “Content-Type”: Therefore the backend server is unable to resolve the body type (which should be JSON) of the data sent from the frontend app. Specifying headers : { “Content-Type”: “application/json” } worked in my case. I wonder how Beau go his code working with that typo error.