Openai error handling python.