You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've changed the code property to be enumerable, as of better-sqlite3 version 7.5.0.
Originally, I made it non-enumerable to match the message property that every error has. However, after reflecting on the Node.js and JavaScript ecosystem, I realized that custom properties of error objects are pretty much always enumerable, to aid in discoverability (i.e., so they appear when using console.log).
I created an issue in the ava test repo (avajs/ava#2755) that explains how sqlite error messages are not shown. It looks like the cause of it is that the errors are not enumerable (see here https://github.com/JoshuaWise/better-sqlite3/blob/master/lib/sqlite-error.js#L13)
Errors end up looking like this:
Is there a reason error messages need to be not enumerable?
The text was updated successfully, but these errors were encountered: