Perhaps ``ProgrammingError`` is more appropriate here?