|
| 1 | +--- |
| 2 | +title: "Troubleshoot connector request failure" |
| 3 | +description: "Troubleshoot connector request failure due to too much returned data using filtering." |
| 4 | +ms.date: 10/16/2024 |
| 5 | +ms.topic: troubleshooting |
| 6 | +ms.author: peterswimm |
| 7 | +ms.reviewer: erickinser |
| 8 | +manager: kjette |
| 9 | +author: peterswimm |
| 10 | +ms.custom: |
| 11 | + - guidance |
| 12 | + - sap:Actions\Connector actions |
| 13 | +--- |
| 14 | + |
| 15 | +# Connector request failure |
| 16 | + |
| 17 | +When using connector actions with custom agents, you may encounter an HTTP error code 400 with the message _Error Code: 400, Error Message: Bad Request_. This error occurs when the request from the connector to the service returns too much data. Copilot Studio limits connector responses to 500 KB. This may happen whether the connector is configured for a specific topic or as an agent-wide action. |
| 18 | + |
| 19 | +If you experience this issue, you need to take steps to filter the responses returned to the connector. You can do this by configuring the inputs to the connector action so that the service returns only the data the agent really needs to respond to the user's request. |
| 20 | + |
| 21 | +## How to resolve |
| 22 | + |
| 23 | +Each connector action has a set of inputs and outputs. Most connectors include inputs that can be used to filter the data request. |
| 24 | +The details of this will vary from connector to connector. You can view information for specific connectors in the [connectors documentation](/connectors/). |
| 25 | + |
| 26 | +For example, suppose you are using a connector to ServiceNow with the [getKnowledgeArticles](/connectors/service-now/#get-knowledge-articles) action enabled. |
| 27 | + |
| 28 | +This action has a `Filter` input parameter that you can use to enter a filter query to limit the data returned by the service. You can also use the `Limit` input parameter to limit the number of records returned to the top few results. |
| 29 | + |
| 30 | +These inputs can be configured in Copilot Studio. The configuration details depend on whether the connector action is configured as an agent-wide action or as a topic-specific connector action. |
| 31 | + |
| 32 | +### Agent-wide action |
| 33 | + |
| 34 | +To configure for an agent-wide action, follow these steps: |
| 35 | + |
| 36 | +1. Under **Agents**, select the agent with the connector you want to configure. |
| 37 | + |
| 38 | +1. Select **Actions** to see the list of actions associated with the agent. |
| 39 | + |
| 40 | +1. Select the action you want to configure from the list of actions. |
| 41 | + |
| 42 | +1. Select **Inputs** and edit the information for the input field you want to configure. |
| 43 | + |
| 44 | +### Topic-specific connector action |
| 45 | + |
| 46 | +To configure for a topic-specific connector action, follow these steps: |
| 47 | + |
| 48 | +1. Under **Agents**, select the agent with the connector you want to configure. |
| 49 | + |
| 50 | +1. Select **Topics** to see the list of topics for the agent. |
| 51 | + |
| 52 | +1. Select the topic you want to configure. You can see the canvas for the topic flow. |
| 53 | + |
| 54 | +1. On the canvas select the connector node for the connector you want to configure. |
| 55 | + |
| 56 | + The typical inputs that are identified from the user input are displayed under **Inputs**. |
| 57 | + |
| 58 | +1. Select **Advanced inputs** to access configurations for additional inputs. |
| 59 | + |
| 60 | +1. Configure the inputs as needed to filter your responses. |
0 commit comments