<!-- 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)

## ClosedError class

The client is already closed.

**Signature:**

```typescript
export declare class ClosedError extends Error implements MotionError 
```
**Extends:** Error

**Implements:** [MotionError](./motion-sdk.motionerror.md)

## Remarks

See [isClosedError()](./motion-sdk.isclosederror.md) for a built-in way to identify [ClosedError](./motion-sdk.closederror.md) objects.

## Constructors

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

Constructor


</th><th>

Modifiers


</th><th>

Description


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

[(constructor)(reason, cause)](./motion-sdk.closederror._constructor_.md)


</td><td>


</td><td>

Constructs a new instance of the `ClosedError` class


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

## Properties

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

Property


</th><th>

Modifiers


</th><th>

Type


</th><th>

Description


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

[cause?](./motion-sdk.closederror.cause.md)


</td><td>

`readonly`


</td><td>

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


</td><td>

_(Optional)_ Error that caused the closure.


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

[errorType](./motion-sdk.closederror.errortype.md)


</td><td>

`readonly`


</td><td>

typeof [closedErrorType](./motion-sdk.closederrortype.md)


</td><td>

Indicates the class of the error.


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

[reason](./motion-sdk.closederror.reason.md)


</td><td>

`readonly`


</td><td>

string


</td><td>

Developer-readable reason for the closure.


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