AgentsDataMap

error_keys

View as MarkdownOpen in Claude

Set error keys on the most recently added webhook, or at the top level if no webhooks exist. If any of these keys appear in the API response, the response is treated as an error.

To always set keys at the top level regardless of webhook context, use global_error_keys().

Parameters

keys
list[str]Required

List of JSON keys whose presence indicates an error.

Returns

DataMap — Self for method chaining.

Example

1from signalwire import DataMap
2
3dm = DataMap("api_call")
4dm.webhook("GET", "https://api.example.com/data")
5dm.error_keys(["error", "error_message"])