Fix error handling in the database query module
Changes in this merge request
- Add proper error handling in libs/db/query_exec. Uses a catch function after each then to proper capture database errors and report them to the user.
- Add logging the error stack when a database query error occurs.
- Change error message reported in the response when a database query occurs, because the user making the request does not need to know about an internal database error.