Get Error Type Python Function Example