<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [motion-sdk](./motion-sdk.md) &gt; [ClosedError](./motion-sdk.closederror.md) &gt; [(constructor)](./motion-sdk.closederror._constructor_.md)

## ClosedError.(constructor)

Constructs a new instance of the `ClosedError` class

**Signature:**

```typescript
constructor(
    reason: string, 
    cause?: MotionError | undefined);
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

reason


</td><td>

string


</td><td>


</td></tr>
<tr><td>

cause


</td><td>

[MotionError](./motion-sdk.motionerror.md) \| undefined


</td><td>

_(Optional)_


</td></tr>
</tbody></table>
