Closed isaac8069 closed 2 years ago
Do you have a status code attached to the res.render or res.redirect that occurs just before you hit this? The error sounds like it doesn't like. Try removing it?
I'm also noticing the "Invalid status code: {apartment: [apartment] }" .... sound like you have that code inside of a res.status?
fixed redirect
I had to do an undo all migration. I re-migrated and started to add back users and apartment listings. After I hitting submit, I'm getting the error message: ERR_HTTP_INVALID_STATUS_CODE . It is creating the listing which I can see on my All Listings page and in the database, but the redirect isn't functioning properly anymore. I have looked at my routes, views, and index.js. I can't seem to find the problem. I researched the error message as well. The suggestions I found was to add an error status to my app.get middleware . However, I don't think that is the appropriate solution as I did not have that prior to migration. It seemed to work just fine. Please see the screenshots below: