Overriden routes error management

Took me 1 and a half year using FA on a daily basis to figure out that errors are managed differently when sent from classic CRUD routes or from smart actions :

in a POST/PUT/DELETE route I have to send this
response.status(400).send('error message');

in a Smart Action route I have to send that :
response.status(400).send({ error: 'error message'});

Why is that ?

Hi @JeremyV,

Later is better than never…
More seriously, these parts were released at different times, and a homogenous API contract was missing.

I am able to create a ticket to ask, for example, give the smart action error handler the capability to handle a string. I won’t be able to give an ETA.
Let me know if you are interested in this.

Hi @Sliman_Medini

I guess that would be useful but not critical. Low priority IMHO.
I’m refactoring all my error mgmt right now to prevent any [object object] cryptic error.