Map socket timeout errors to OperationalError instead of InterfaceError
Description
socket.timeouts are a subclass within socket.error, and socket.error is classified as InterfaceError. Hence socket.timeouts gets classified as InterfaceError as well. This change will map socket.timeouts alone to OperationalError, where other exceptions within socket.errors will remain unchanged.
Map socket timeout errors to OperationalError instead of InterfaceError
Description
socket.timeouts are a subclass within socket.error, and socket.error is classified as InterfaceError. Hence socket.timeouts gets classified as InterfaceError as well. This change will map socket.timeouts alone to OperationalError, where other exceptions within socket.errors will remain unchanged.
Motivation and Context
This PR resolves this issue
Testing
Conducted manual testing - hit timeout and received the below error message:
Added unit test and integration test as well.
Screenshots (if appropriate)
Types of changes
Checklist
./build.sh
succeedspytest test/unit
and they are passing.