Unhandled 422 error when posting new object

Hi @theo744,

Following the code of forest-express-sequelize, it seems like the only way to trigger a 422 from resource-creator.js is with an invalid model. (This is visible here). I still find this concerning since you should have a valid error message, but I’m currently not able to reproduce

A workaround to debug this would be to add logs inside node_modules/forest-express-sequelize/services/resource-creator.js, or a debug log of the request body inside the route that fails, just to be sure that your model is valid.

I can see in your code (Not sure that really matters) that customValidator is using == to compare instead of the more usual ===. I can’t be sure that is the source of the issue, but I would suggest to give this a try.

Sadly, in the provided HAR, I can’t see any HTTP 422 :confused: