Add tests for additional DB-related error messages

#29