Error Handling for Python

Is there a framework for handling errors and exceptions?

I can't seem to be able to import the "sys" module, so when an API fails, I have no clue as to the cause of the same.