# TooMuchContentionError (/docs/collab/reference/collab-server/classes/TooMuchContentionError)



# Class: TooMuchContentionError [#class-toomuchcontentionerror]

Defined in:
[packages/collab-server/src/index.ts:16](https://github.com/handlewithcarecollective/pitter-patter/blob/81896664a0707dea093e9edc81dae89a35a20ad2/packages/collab-server/src/index.ts#L16)

## Extends [#extends]

* `Error`

## Constructors [#constructors]

### Constructor [#constructor]

```ts
new TooMuchContentionError(): TooMuchContentionError;
```

Defined in:
[packages/collab-server/src/index.ts:17](https://github.com/handlewithcarecollective/pitter-patter/blob/81896664a0707dea093e9edc81dae89a35a20ad2/packages/collab-server/src/index.ts#L17)

#### Returns [#returns]

`TooMuchContentionError`

#### Overrides [#overrides]

```ts
Error.constructor;
```

## Properties [#properties]

### message [#message]

```ts
message: string;
```

Defined in: node\_modules/.store/typescript-patch-bfb0cdd3b9/package/lib/lib.es5.d.ts:1075

#### Inherited from [#inherited-from]

```ts
Error.message;
```

***

### name [#name]

```ts
name: string;
```

Defined in: node\_modules/.store/typescript-patch-bfb0cdd3b9/package/lib/lib.es5.d.ts:1074

#### Inherited from [#inherited-from-1]

```ts
Error.name;
```

***

### stack? [#stack]

```ts
optional stack?: string;
```

Defined in: node\_modules/.store/typescript-patch-bfb0cdd3b9/package/lib/lib.es5.d.ts:1076

#### Inherited from [#inherited-from-2]

```ts
Error.stack;
```

***

### stackTraceLimit [#stacktracelimit]

```ts
static stackTraceLimit: number;
```

Defined in: node\_modules/.store/@types-node-npm-25.6.0-429799b5e8/package/globals.d.ts:67

The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace
(whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`).

The default value is `10` but may be set to any valid JavaScript number. Changes will affect any
stack trace captured *after* the value has been changed.

If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

#### Inherited from [#inherited-from-3]

```ts
Error.stackTraceLimit;
```

## Methods [#methods]

### captureStackTrace() [#capturestacktrace]

```ts
static captureStackTrace(targetObject: object, constructorOpt?: Function): void;
```

Defined in: node\_modules/.store/@types-node-npm-25.6.0-429799b5e8/package/globals.d.ts:51

Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the
location in the code at which `Error.captureStackTrace()` was called.

```js
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`
```

The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`.

The optional `constructorOpt` argument accepts a function. If given, all frames above
`constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace.

The `constructorOpt` argument is useful for hiding implementation details of error generation from
the user. For instance:

```js
function a() {
  b();
}

function b() {
  c();
}

function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;

  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}

a();
```

#### Parameters [#parameters]

##### targetObject [#targetobject]

`object`

##### constructorOpt? [#constructoropt]

`Function`

#### Returns [#returns-1]

`void`

#### Inherited from [#inherited-from-4]

```ts
Error.captureStackTrace;
```

***

### prepareStackTrace() [#preparestacktrace]

```ts
static prepareStackTrace(err: Error, stackTraces: CallSite[]): any;
```

Defined in: node\_modules/.store/@types-node-npm-25.6.0-429799b5e8/package/globals.d.ts:55

#### Parameters [#parameters-1]

##### err [#err]

`Error`

##### stackTraces [#stacktraces]

`CallSite`\[]

#### Returns [#returns-2]

`any`

#### See [#see]

[https://v8.dev/docs/stack-trace-api#customizing-stack-traces](https://v8.dev/docs/stack-trace-api#customizing-stack-traces)

#### Inherited from [#inherited-from-5]

```ts
Error.prepareStackTrace;
```
