---
title: "Catch HTTP Connector Errors"
slug: "catch-http-connector-errors"
updated: 2024-06-20T23:24:24Z
published: 2024-06-20T23:24:24Z
canonical: "support.tulip.co/catch-http-connector-errors"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://support.tulip.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Catch HTTP Connector Errors

*Understand the use cases of catching an HTTP API Connector error, as well as how to log the error and retry the connector function.*

## Types of HTTP Connector Errors

Included in the HTTP protocol standard is the requirement for a server response code and message, known as **HTTP Response Code** and **HTTP Response Message**. With this, there are standard HTTP response code classes, or categories to help end users intuitively signify the type of error which occurred. These code classes include the following:

- *1xx* - **informational response**  

The request was received, continuing process
- *2xx* - **successful**  

The request was successfully received, understood, and accepted
- *3xx* - **redirection**  

Further action needs to be taken in order to complete the request
- *4xx* - **client error**  

The request contains bad syntax or cannot be fulfilled
- *5xx* - **server error**  

The server failed to fulfill an apparently valid request

The most common error code one might encounter is `404 - Not Found` or `500 - Internal Server Error`. These error codes could indicate that the external system server is down, there is ongoing maintenance, there is an issue with the service, or there is a network issue.

## Example: Catch HTTP Errors in an App

The following example details how to configure an app to display HTTP connector function errors.

### Build the Connector Function

In the Connector Function builder, you can map the HTTP Error Code and Error Message in the connector Output configuration. This will pass the HTTP Error Code and Error Message as connector function outputs to be later used in Tulip Apps.

1. Map the HTTP status fields to outputs. ![Connector Output Mapping 1.png](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/Connector%20Output%20Mapping%201.png)
2. Give the outputs a clear, distinct name and re-run the connector function to test if the output appears correctly. ![Connector Output Mapping 2.png](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/Connector%20Output%20Mapping%202.png)

This will look like the following example: ![Catch Connector Errors Overview.gif](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/Catch%20Connector%20Errors%20Overview.gif)

### Build an App to Handle Connector Errors

Use the information of the connector's outputs in apps to perform connector error handling.

#### Run the Connector in an App Trigger

Build a trigger action with **Run Connector Function**. Select the connector and function you just built, then save the result as a **Variable**. ![Run Connector Trigger - Error Catching.png](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/Run%20Connector%20Trigger%20-%20Error%20Catching.png)

The HTTP Response Code and Message are now available as a reference in the new app variable. ![HTTP Response Code as Variable.png](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/HTTP%20Response%20Code%20as%20Variable.png)

#### Visualize the Connector Response in an App

Place a Variable widget on an app Step which displays the entire **Connector Response** variable. ![Visualize connector response with variable widget.gif](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/Visualize%20connector%20response%20with%20variable%20widget.gif)

### Build Connector Error Handling Trigger

Next, you can use the HTTP response code to perform app-level error handling on a subsequent trigger condition.

1. Create a new trigger to perform the **Connector Error Handling**. ![Connector Error Handling Trigger.png](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/Connector%20Error%20Handling%20Trigger.png)
2. Create a condition that looks for the HTTP response code that are incorrect. In this example, the condition looks for responses that **do not equal** 200.

          Note

          

Many systems use a 200 response code as a good response, but it is best to check with the API endpoint provider or IT if all good responses will only be of code 200

1. Create a trigger action to occur when the condition is met, when HTTP response code is bad.  

![Bad Response Code Trigger.png](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/Bad%20Response%20Code%20Trigger.png)

Here is what this looks like in the app: ![HTTP Error Response Overview.gif](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/HTTP%20Error%20Response%20Overview.gif)

## Further Reading

- [How to Create and Configure an HTTP Connector Function](/r230/docs/how-to-create-and-configure-an-http-connector-function)
- [How to Format HTTP Connector Outputs](/r230/docs/how-to-format-http-connector-outputs)
- [Using HTTP Connectors in Apps](/r230/docs/using-http-connectors-in-apps)

**Connector Function**

**Connector Functions** are individual operations to interact with an HTTP or SQL Datasources. Connector Functions can have inputs and outputs, and can be called from: Triggers, Functions, Automations, and AI Agents.

Once pulled, data can be used throughout your applications.

**Output**

An **output** is the transmission of data from a program to a data set.

**Variable**

**Variables**are a location to store app information. Variables have a specific type that must match the contents they can store.

Variables are only accessible within a single application and are cleared when the app is restarted or completed.

**Step**

A view your users will see within an application. **Steps** can be viewed chronologically or in whatever order best fits your process.

Steps can be grouped into **Step Groups**to manage and organize your app Steps.
