2020-06-04 14:56:45 +00:00
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home ](./index.md ) > [puppeteer ](./puppeteer.md ) > [Puppeteer ](./puppeteer.puppeteer.md ) > [errors ](./puppeteer.puppeteer.errors.md )
## Puppeteer.errors property
< b > Signature:< / b >
```typescript
get errors(): PuppeteerErrors;
```
2020-06-24 14:21:46 +00:00
## Remarks
Puppeteer methods might throw errors if they are unable to fulfill a request. For example, `page.waitForSelector(selector[, options])` might fail if the selector doesn't match any nodes during the given timeframe.
2020-07-08 09:29:58 +00:00
For certain types of errors Puppeteer uses specific error classes. These classes are available via `puppeteer.errors` <!-- --> .
2020-06-24 14:21:46 +00:00
## Example
An example of handling a timeout error:
```js
try {
await page.waitForSelector('.foo');
} catch (e) {
if (e instanceof puppeteer.errors.TimeoutError) {
// Do something if this is a timeout.
}
}
```