How to handle errors in knex

Viewed 354

I am using knex.js in my node project to handle sql database. I am trying to handle the query errors but it is throwing the entire query in my error.

I printed the errors and found out that it returns code in the error I just want to use that as a point and display my own error message, my question here is that if there is a list of the error codes so that I can make use of it?

I read knex.js documentation but I don't seem to find anything regarding it.

0 Answers
Related