***

title: global_error_keys
slug: /reference/python/agents/data-map/global-error-keys
description: Set top-level error detection keys that apply regardless of webhook context.
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/python/agents/data-map

Set error keys at the top-level data\_map scope, regardless of webhook context.
If any of these keys are present in a webhook response, the response is treated
as an error.

## **Parameters**

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

## **Returns**

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

## **Example**

```python {4}
from signalwire import DataMap, FunctionResult

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