---
title: SensorErrorEvent.error
slug: Web/API/SensorErrorEvent/error
tags:
  - API
  - Error
  - Generic Sensor API
  - Property
  - Reference
  - Sensor
  - Sensor APIs
  - SensorErrorEvent
  - Sensors
browser-compat: api.SensorErrorEvent.error
---
{{APIRef("Sensor API")}}

The **`error`** read-only property of
the {{domxref("SensorErrorEvent")}} interface returns the {{domxref('DOMException')}}
object passed in the event's constructor.

## Syntax

```js
var domException = sensorErrorEvent.error;
```

### Value

A {{domxref('DOMException')}}.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}
