Better logging if SQLite exception is thrown during API call