diff --git a/docs/api.md b/docs/api.md index ee85e3d712d..89d24bf0dbb 100644 --- a/docs/api.md +++ b/docs/api.md @@ -2156,7 +2156,7 @@ Example of logging all failed requests: ```js page.on('requestfailed', request => { - console.log(request.url + ' ' + request.failure().errorText); + console.log(request.url() + ' ' + request.failure().errorText); }); ```