feat(request): add new error reasons for request.abort() (#2771)
As the title indicated, adds two allowed error codes that are specified in the Chrome Developer Tools Protocol specifications but missing from the Puppeteer enum: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-ErrorReason
This commit is contained in:
parent
37dbfc2608
commit
1064aa4476
@ -2628,6 +2628,8 @@ If request gets a 'redirect' response, the request is successfully finished with
|
|||||||
- `accessdenied` - Permission to access a resource, other than the network, was denied
|
- `accessdenied` - Permission to access a resource, other than the network, was denied
|
||||||
- `addressunreachable` - The IP address is unreachable. This usually means
|
- `addressunreachable` - The IP address is unreachable. This usually means
|
||||||
that there is no route to the specified host or network.
|
that there is no route to the specified host or network.
|
||||||
|
- `blockedbyclient` - The client chose to block the request.
|
||||||
|
- `blockedbyresponse` - The request failed because the response was delivered along with requirements which are not met ('X-Frame-Options' and 'Content-Security-Policy' ancestor checks, for instance).
|
||||||
- `connectionaborted` - A connection timed out as a result of not receiving an ACK for data sent.
|
- `connectionaborted` - A connection timed out as a result of not receiving an ACK for data sent.
|
||||||
- `connectionclosed` - A connection was closed (corresponding to a TCP FIN).
|
- `connectionclosed` - A connection was closed (corresponding to a TCP FIN).
|
||||||
- `connectionfailed` - A connection attempt failed.
|
- `connectionfailed` - A connection attempt failed.
|
||||||
|
@ -506,6 +506,8 @@ const errorReasons = {
|
|||||||
'aborted': 'Aborted',
|
'aborted': 'Aborted',
|
||||||
'accessdenied': 'AccessDenied',
|
'accessdenied': 'AccessDenied',
|
||||||
'addressunreachable': 'AddressUnreachable',
|
'addressunreachable': 'AddressUnreachable',
|
||||||
|
'blockedbyclient': 'BlockedByClient',
|
||||||
|
'blockedbyresponse': 'BlockedByResponse',
|
||||||
'connectionaborted': 'ConnectionAborted',
|
'connectionaborted': 'ConnectionAborted',
|
||||||
'connectionclosed': 'ConnectionClosed',
|
'connectionclosed': 'ConnectionClosed',
|
||||||
'connectionfailed': 'ConnectionFailed',
|
'connectionfailed': 'ConnectionFailed',
|
||||||
|
Loading…
Reference in New Issue
Block a user