Skip to content

Commit 2581944

Browse files
committed
Update document for Request.abort()
1 parent e979d5e commit 2581944

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

pyppeteer/network_manager.py

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -568,10 +568,25 @@ async def abort(self, errorCode: str = 'failed') -> None:
568568
If request interception is not enabled, raise ``NetworkError``.
569569
570570
``errorCode`` is an optional error code string. Defaults to ``failed``,
571-
could be one of the following: ``aborted``, ``accesdenied``,
572-
``addressunreachable``, ``connectionaborted``, ``connectionclosed``,
573-
``connectionfailed``, ``connnectionrefused``, ``connectionreset``,
574-
``internetdisconnected``, ``namenotresolved``, ``timedout``, ``failed``
571+
could be one of the following:
572+
573+
- ``aborted``: An operation was aborted (due to user action).
574+
- ``accesdenied``: Permission to access a resource, other than the
575+
network, was denied.
576+
- ``addressunreachable``: The IP address is unreachable. This usually
577+
means that there is no route to the specified host or network.
578+
- ``connectionaborted``: A connection timeout as a result of not
579+
receiving an ACK for data sent.
580+
- ``connectionclosed``: A connection was closed (corresponding to a TCP
581+
FIN).
582+
- ``connectionfailed``: A connection attempt failed.
583+
- ``connnectionrefused``: A connection attempt was refused.
584+
- ``connectionreset``: A connection was reset (corresponding to a TCP
585+
RST).
586+
- ``internetdisconnected``: The Internet connection has been lost.
587+
- ``namenotresolved``: The host name could not be resolved.
588+
- ``timedout``: An operation timed out.
589+
- ``failed``: A generic failure occurred.
575590
"""
576591
errorReason = errorReasons[errorCode]
577592
if not errorReason:

0 commit comments

Comments
 (0)