Hey folks
I am currently having a behavior that seems a bit weird as I am sure it was working before…
In my route, I, most of the time, need to validate the input data on create/update and so, I am throwing error so the UI displays that red pop up on the bottom right with a text message that indicates an error
Exemple:
// Create a Item
router.post('/items', permissionMiddlewareCreator.create(), (request, response, next) => {
// Learn what this route does here: https://docs.forestadmin.com/documentation/v/v6/reference-guide/routes/default-routes#create-a-record
throw new Error("Test for error pop-up")
}
Expected behavior
I would expect a pop up when Error are thrown from within a route
Actual behavior
Only some red output are displayed in the console
Failure Logs
Sometimes, I even get Unhandled rejection error
(maybe related to a promise approach I have, i don’t know)
Context
Package json
{
"name": "my-app",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node ./dist/server.js",
"legacy-start": "node server.js",
"build": "tsc",
"start-dev": "tsc-watch --project ./tsconfig.json --noClear --onSuccess \"nodemon --watch ./dist ./dist/server.js\""
},
"dependencies": {
"@types/express": "^4.17.11",
"@types/forest-express-mongoose": "^6.3.3",
"@types/mongoose": "^5.10.3",
"axios": "^0.21.1",
"body-parser": "1.19.0",
"chalk": "~1.1.3",
"cookie-parser": "1.4.4",
"cors": "2.8.5",
"debug": "~4.0.1",
"dotenv": "~6.1.0",
"express": "~4.17.1",
"express-jwt": "5.3.1",
"forest-express-mongoose": "^6.0.0",
"mongoose": "~5.8.2",
"morgan": "1.9.1",
"nodemon": "^2.0.7",
"require-all": "^3.0.0",
"tsc-watch": "^4.2.9",
"typescript": "^4.1.3"
}
}
Thanks for any help!
Max