I am new to feathers and am building an API, generated with feathers-cli. If the client performs an invalid GET request:
eg. http://localhost:3030/stations/?asdfasdf
it returns a 500 error:
ER_BAD_FIELD_ERROR: Unknown column 'stations.asdfasdf' in 'where clause'
I'd rather not report an error like that back to the client and would instead like to return a '400 Bad Request' instead. I've tried setting up an after hook using hook.error
but this doesn't catch the sequelize error.
How can I catch the error and return a safer, more generic message to the client?