# Troubleshooting

If you encounter any of the following issues or errors, SailPoint recommends that you follow the guidance provided below to resolve the error before contacting SailPoint Support.

For issues or errors that are not addressed in this connector guide, refer to the following resources for troubleshooting information:

- [SailPoint Identity Services Documentation](<https://documentation.sailpoint.com/saas/help/index.html>)
- [SailPoint Support Knowledge Base](<https://support.sailpoint.com/csm?id=kb_view2&amp;kb_id=05ff44289f011200550bf7b6077fcfa3>)
- [SailPoint Developer Community](<https://developer.sailpoint.com/>)

## Unable to set custom headers during the creation of a ticket or check the status

**Resolution**: You need to manually add the required headers in the request using the REST APIs and update the source. Following are the steps to include headers in the API request:

1. Use [GET](<https://developer.sailpoint.com/docs/api/get-service-desk-integrations-v-1/>) API to get to the particular SDIM using its Id.
2. Add the header you want under the `provision` to create a ticket or else add the header under the `checkStatus` to check the status of a ticket.

   For example, to create a ticket add the custom header under `provision` as shown in the body of the request:

   ```text
   "id": "8863a433fec3",
   "name": "xyz Generic SDIM",
   ....
   "provision": {
   ....
   "headers": {
   "Accept": "application/json",
   "Content-Type": "application/json"
   }
   }
   ```

   To check status of a ticket add the custom header under `checkStatus` as shown in the body of the request:

   ```text
   "generic": {
   "checkStatus": {
   ....
   headers": {
   "Accept": "application/json",
   "Content-Type": "application/json"
   }
   },
   ```
3. Update the Source using [PUT](<https://developer.sailpoint.com/docs/api/put-service-desk-integration-v-1/>) API.

## Unable to pass an empty array through the provisioning plan during ticket creation

**Resolution**: The steps to add an empty array so the connector can pass it to the managed system are as follows:

1. Request to enable feature flag on SailPoint: `CON_SDIM_EMPTY_ARRAY_SUPPORT`.
2. Go to **Integration Edit** page. You can enable this feature in two ways:

   Option 1: Add a Multi-Valued Field in Ticket Creation

   - Create a multi-valued field with any field name.
   - Assign a single value with `null` as its value.

     > **Screenshot**
     >
     > [![Multi-valued field with null value](<https://documentation.sailpoint.com/connectors/service_desk_integrations/generic/help/img/troubleshooting_empty_array_multi_valued.png>)](<https://documentation.sailpoint.com/connectors/service_desk_integrations/generic/help/img/troubleshooting_empty_array_multi_valued.png>)

   Option 2: Add a Raw JSON Field

   - Add a raw JSON field with the following value `[null]`.

     > **Screenshot**
     >
     > [![Raw JSON field with null value](<https://documentation.sailpoint.com/connectors/service_desk_integrations/generic/help/img/troubleshooting_empty_array_raw_json.png>)](<https://documentation.sailpoint.com/connectors/service_desk_integrations/generic/help/img/troubleshooting_empty_array_raw_json.png>)
