> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AvroError

> AvroError — Kinetica Node.js API

Thrown when a value does not fit its schema, when binary data cannot be decoded with the schema given, or when a schema itself is invalid.

#### Hierarchy

<ul>
  <li>
    Error

    <ul>
      <li>AvroError</li>
    </ul>
  </li>
</ul>

<ul>
  <li>Defined in [src/avro.ts:42](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/avro.ts#L42)</li>
</ul>

##### Index

### Constructors

[constructor](#constructor)&#x20;

### Properties

[message](#message) [name](#name) [path](#path) [stack?](#stack) [stackTraceLimit](#stacktracelimit)&#x20;

### Methods

[captureStackTrace](#capturestacktrace) [prepareStackTrace](#preparestacktrace)&#x20;

## Constructors

### constructor

<ul>
  <li>
    new AvroError(reason: string): AvroError

    #### Parameters

    <ul>
      <li>reason: string</li>
    </ul>

    #### Returns AvroError

    Overrides Error.constructor

    <ul>
      <li>Defined in [src/avro.ts:48](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/avro.ts#L48)</li>
    </ul>
  </li>
</ul>

## Properties

### message

message: string

Inherited from Error.message

<ul>
  <li>Defined in [../kinetica-docs/mintlify/.typedoc/typedoc-0.28.20-ts-5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1077](https://github.com/kineticadb/kinetica-api-typescript/blob/master/../kinetica-docs/mintlify/.typedoc/typedoc-0.28.20-ts-5.9.3/node_modules/typescript/lib/lib.es5.d.ts#L1077)</li>
</ul>

### name

name: string

Inherited from Error.name

<ul>
  <li>Defined in [../kinetica-docs/mintlify/.typedoc/typedoc-0.28.20-ts-5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1076](https://github.com/kineticadb/kinetica-api-typescript/blob/master/../kinetica-docs/mintlify/.typedoc/typedoc-0.28.20-ts-5.9.3/node_modules/typescript/lib/lib.es5.d.ts#L1076)</li>
</ul>

### `Readonly`path

path: string\[] = \[]

Field names and array/map positions leading to the offending value

<ul>
  <li>Defined in [src/avro.ts:44](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/avro.ts#L44)</li>
</ul>

### `Optional`stack

stack?: string

Inherited from Error.stack

<ul>
  <li>Defined in [../kinetica-docs/mintlify/.typedoc/typedoc-0.28.20-ts-5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1078](https://github.com/kineticadb/kinetica-api-typescript/blob/master/../kinetica-docs/mintlify/.typedoc/typedoc-0.28.20-ts-5.9.3/node_modules/typescript/lib/lib.es5.d.ts#L1078)</li>
</ul>

### `Static`stackTraceLimit

stackTraceLimit: number

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 Error.stackTraceLimit

<ul>
  <li>Defined in [node\_modules/@types/node/globals.d.ts:68](https://github.com/kineticadb/kinetica-api-typescript/blob/master/node_modules/@types/node/globals.d.ts#L68)</li>
</ul>

## Methods

### `Static`captureStackTrace

<ul>
  <li>
    captureStackTrace(targetObject: object, constructorOpt?: Function): void

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

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

    The first line of the trace will be prefixed with `{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:

    ```
    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

    <ul>
      <li>targetObject: object</li>
      <li>`Optional`constructorOpt: Function</li>
    </ul>

    #### Returns void

    Inherited from Error.captureStackTrace

    <ul>
      <li>Defined in [node\_modules/@types/node/globals.d.ts:52](https://github.com/kineticadb/kinetica-api-typescript/blob/master/node_modules/@types/node/globals.d.ts#L52)</li>
    </ul>
  </li>
</ul>

### `Static`prepareStackTrace

<ul>
  <li>
    prepareStackTrace(err: Error, stackTraces: CallSite\[]): any

    #### Parameters

    <ul>
      <li>err: Error</li>
      <li>stackTraces: CallSite\[]</li>
    </ul>

    #### Returns any

    #### See

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

    Inherited from Error.prepareStackTrace

    <ul>
      <li>Defined in [node\_modules/@types/node/globals.d.ts:56](https://github.com/kineticadb/kinetica-api-typescript/blob/master/node_modules/@types/node/globals.d.ts#L56)</li>
    </ul>
  </li>
</ul>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.