Handle SQL errors in list() and count() ahdering to persistence.js "style"