问题
How does one detect the type of an error that occurs in bookshelf.js when talking to PostgreSQL (or another RDBMS)?
Prompted by this question; I don't use bookshelf.js myself.
A search of the manual did not reveal much that was enlightening.
来源:https://stackoverflow.com/questions/43827704/how-to-get-sqlstate-in-bookshelf-js