GumpacG commented on code in PR #3507:
URL: https://github.com/apache/tinkerpop/pull/3507#discussion_r3532467630


##########
gremlin-python/src/main/python/gremlin_python/driver/aiohttp/transport.py:
##########
@@ -71,6 +71,17 @@ def _normalize_compression(compression):
     raise TypeError("compression must be a str ('none'|'deflate'), got %s" % 
type(compression).__name__)
 
 
+def _run_read(loop, read_timeout, coro):
+    """Run a response-read coroutine on ``loop``, normalizing aiohttp's read 
timeout
+    (SocketTimeoutError / ServerTimeoutError) into a plain 
``asyncio.TimeoutError`` so a
+    read timeout always surfaces as one deterministic, library-agnostic 
type."""
+    try:
+        return loop.run_until_complete(coro)
+    except aiohttp.ServerTimeoutError as e:
+        raise asyncio.TimeoutError(

Review Comment:
   Good suggestion. I created a custom error.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to