# `Playwright.PlaywrightError`
[🔗](https://github.com/ftes/playwright_ex/blob/v1.65.0-rc.3/lib/playwright/playwright_error.ex#L5)

A Playwright error other than a timeout, closed target or abort.

Port of JS `Error` thrown by Playwright (`packages/playwright-core/src/client/errors.ts`).
`Playwright.TimeoutError`, `Playwright.TargetClosedError` and `Playwright.AbortError` have
the same fields. They keep their JS names:

  * `message` - JS's message: the API name, the error, then the call log
    (`"locator.click: Timeout 100ms exceeded.
Call log:
..."`).
  * `name` - the JS error name: `"Error"` unless the driver sends another.
  * `log` - the call log, a list of lines.
  * `details` - the error details the protocol declares for the call (a map), else `nil`.
  * `stack` - the driver's JS stack trace (`""` for errors of the client).
  * `code` - a system error code (`"ECONNREFUSED"`), else `nil`.
  * `cause` - the error behind this one, else `nil`: the `File.Error` of a storage-state file
    that can't be read, the reason given to `Playwright.AbortController.abort/2`.

# `t`

```elixir
@type t() :: %Playwright.PlaywrightError{
  __exception__: term(),
  cause: term(),
  code: String.t() | nil,
  details: map() | nil,
  log: [String.t()],
  message: String.t(),
  name: String.t(),
  stack: String.t()
}
```

See the module docs for the fields.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
