mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
feat(Page): introduce url at error message at page.goto (#2174)
Now the error message will come with the url where the error was generated. Fixes #2165.
This commit is contained in:
committed by
Andrey Lushnikov
parent
826fe42c48
commit
52d3bc05de
@@ -518,7 +518,7 @@ class Page extends EventEmitter {
|
||||
async function navigate(client, url, referrer) {
|
||||
try {
|
||||
const response = await client.send('Page.navigate', {url, referrer});
|
||||
return response.errorText ? new Error(response.errorText) : null;
|
||||
return response.errorText ? new Error(`${response.errorText} at ${url}`) : null;
|
||||
} catch (error) {
|
||||
return error;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user