Skip to main content
Uses: Python · TypeScript · CLI · REST API
Tool execution has two independent failure layers, and confusing them is the most common source of wasted debugging time.
cURL samples assume BASE=https://api.engini.io/v1 and AUTH="x-api-key: $ENGINI_API_KEY" - the setup from the REST walkthrough.

Always branch on isSuccess

A 200 means Engini reached the downstream app. It does not mean the app was happy.
In the SDKs this surfaces as EnginiToolExecutionError, carrying error_message, execution_info and history_id - so you get the same three facts without unpacking JSON yourself.

Read executionInfo

When a tool fails, executionInfo tells you what the downstream API actually did:
  • statusCode - the downstream app’s status, not Engini’s. A 401 here means their credentials expired, which usually means the connection needs refreshing.
  • executionTime / dataSize - useful when a call is slow or a response is unexpectedly huge.
  • historyId - the execution record. Quote it in support requests; it’s the fastest way for us to find the exact run.

Decode the call-level failures

When the call itself fails, branch on errorCode rather than parsing message - messages get reworded, codes are contract.

Check the connection, not the tool

If the same tool fails for one connection and works for another, the connection is the suspect:
A completed object refresh is an even stronger signal than check, because it proves the credential actually authenticated against the provider - see object sync.

Always keep the request id

Every response carries an x-request-id header, echoed as requestId in error bodies:
Include it - with historyId if you have one - in any support request. Those two ids let us reconstruct your exact call.

From the CLI

--dry-run is the cheapest debugging tool available: it validates and previews the request without executing, so you can rule out malformed input before wondering about the connector.