Articles in this section

Troubleshoot APIs

Building an API in API builder takes more than configuring requests, responses, and steps. You also need a way to confirm it works correctly and to understand what happened when it doesn't. API builder gives you three tools for that: test mode, for validating your configuration before you deploy; request history and trace view, for reviewing what happened after a request runs; and error handling controls, for shaping what your API consumers see when something fails. If a connection your API uses goes offline, a separate API setting controls how the API responds.

Use the article that matches what you're trying to do:

  • Before you deploy your API: Run your API in test mode against mock data and review how each step behaves, without affecting live records. See Test and debug your API using API builder.
  • After your API is live: Review inbound requests in request history, turn on debug logging for more detail, and open trace view to follow a specific request step by step. See View API request and execution logs in API builder.
  • When consumers see an error: Configure your response picker, custom error responses, and response mapping so consumers receive clear, appropriate errors instead of internal details. See Error handling in API builder.
  • When a connection your API uses is offline: Find out why requests fail with HTTP 500 or 504 and how to resolve them. See Troubleshoot offline connection failures in this article.

Troubleshoot offline connection failures

When a connection your API uses is offline, the API fails in one of two ways, depending on the API's Immediate error for offline connections setting. To change the setting, see Set how an API handles offline connections. To find these failures in request history, see Find offline connection failures.

Your API returns HTTP 500 immediately

  • Cause: The setting is on, and a connection the API uses is offline.
  • Resolution: Open the Connections tab in API builder to find the offline connection, then fix the offline connection. Callers can retry once the connection is back online. The caller receives the message "One or more connections used by this API are offline. Contact the API publisher and try again later."

Requests wait, then fail when the API times out

  • Cause: The setting is off, and the request reached a step whose connection is offline. The request waited until the API's timeout ran out: the Override timeout value, or the Organization-wide API timeout limit if no override is set.
  • Resolution: Fix the offline connection. If callers can't wait, turn the setting on.