***

title: globalErrorKeys
slug: /reference/typescript/agents/data-map/global-error-keys
description: Set global error-detection keys that apply to all webhooks.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

[ref-datamap]: /docs/server-sdks/reference/typescript/agents/data-map

Set global error-detection keys that apply to all webhooks in this DataMap.
If any of these keys are present in a webhook response, the response is
treated as an error.

## **Parameters**

<ParamField path="keys" type="string[]" required={true} toc={true}>
  Response keys that indicate an error occurred.
</ParamField>

## **Returns**

[`DataMap`][ref-datamap] -- Self for method chaining.

## **Example**

```typescript {4}
import { DataMap, FunctionResult } from '@signalwire/sdk';

const dm = new DataMap('get_weather');
dm.globalErrorKeys(['error', 'fault', 'exception']);
dm.webhook('GET', 'https://api.weather.com/v1/current?q=${args.city}');
dm.output(new FunctionResult('Weather: ${response.current.condition.text}'));
```