---
title: FunctionApiError
slug: data-platform/connect-platform/app-sdk-api-reference-classes-functionapierror
docTags: 
createdAt: 2026-08-05T20:06:34.295Z
---

[OCP App SDK](docId\:gxEU_0AA37IEZJK-uoVcT)

***

[OCP App SDK](docId\:gxEU_0AA37IEZJK-uoVcT) / FunctionApiError

# Class: FunctionApiError

Defined in: [src/functions/FunctionApi.ts:4](https://github.com/ZaiusInc/app-sdk/blob/8c7209817facb226c91abb960e6d54a7692b9aa2/src/functions/FunctionApi.ts#L4)

Error thrown when function api interaction fails

## Extends

- `Error`

## Constructors

### Constructor

:::BlockQuote
**new FunctionApiError**(`message?`): `FunctionApiError`
:::

Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1082

### Parameters

### message?

`string`

### Returns

`FunctionApiError`

### Inherited from

`Error.constructor`

### Constructor

:::BlockQuote
**new FunctionApiError**(`message?`, `options?`): `FunctionApiError`
:::

Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1082

### Parameters

### message?

`string`

### options?

`ErrorOptions`

### Returns

`FunctionApiError`

### Inherited from

`Error.constructor`

## Properties

### cause?

:::BlockQuote
`optional` **cause**: `unknown`
:::

Defined in: node\_modules/typescript/lib/lib.es2022.error.d.ts:26

### Inherited from

`Error.cause`

***

### message

:::BlockQuote
**message**: `string`
:::

Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1077

### Inherited from

`Error.message`

***

### name

:::BlockQuote
**name**: `string`
:::

Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1076

### Inherited from

`Error.name`

***

### stack?

:::BlockQuote
`optional` **stack**: `string`
:::

Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1078

### Inherited from

`Error.stack`

***

### prepareStackTrace()?

:::BlockQuote
`static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any`
:::

Defined in: node\_modules/@types/node/globals.d.ts:143

Optional override for formatting stack traces

### Parameters

### err

`Error`

### stackTraces

`CallSite`\[]

### Returns

`any`

### See

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

### Inherited from

`Error.prepareStackTrace`

***

### stackTraceLimit

:::BlockQuote
`static` **stackTraceLimit**: `number`
:::

Defined in: node\_modules/@types/node/globals.d.ts:145

### Inherited from

`Error.stackTraceLimit`

## Methods

### captureStackTrace()

:::BlockQuote
`static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void`
:::

Defined in: node\_modules/@types/node/globals.d.ts:136

Create .stack property on a target object

### Parameters

### targetObject

`object`

### constructorOpt?

`Function`

### Returns

`void`

### Inherited from

`Error.captureStackTrace`
