I believe these two types of exceptions should be handled internally to just abort the autocompletion (equivalent to returning an empty list), instead of leaking and flooding the terminal with a traceback.
I'm willing to try and fix this if maintainers agree :)