# How to Solve UNKNOWN\_EXCEPTION Errors

## How to Solve UNKNOWN\_EXCEPTION Errors

On rare occasions a site may receive an UNKNOWN\_EXCEPTION from CopyStorm. In CopyStorm’s log, the error will look like:

10-Feb-17 09:02:11: \[UnexpectedErrorFault \[ApiFault exceptionCode=’UNKNOWN\_EXCEPTION’ exceptionMessage=’An unexpected error occurred. Please include this ErrorId if you contact support: 303701882-51722 (1187285824)’ extendedErrorDetails='{\[0]}’

This error is generated by Salesforce’s server when it encounters a problem that Salesforce code does not know how to handle. Most of the time the issue will resolve itself after a couple days as Salesforce fixes their own internal problems. If the problem does not clear up automatically then this article may help you resolve the issue.

In Capstorm’s experience, to get Salesforce support to pay attention to UNKNOWN\_EXCEPTION issues a problem has to be reproduced in an application supplied totally by Salesforce. When this error is being given by Salesforce we need to:

* Isolate the SOQL query in CopyStorm that is causing the problem.
* Run the query in the Salesforce console to prove that the query is causing the issue.
* Submit a case to Salesforce.

## Step 1: Isolate the SOQL Query in CopyStorm

1. Start CopyStorm from a command line window with the “-debug” command line switch.
   1. CopyStorm.bat -debug
   2. sh CopyStorm.sh -debug
2. On the Advanced tab, select “Debug Mode” under “Misc Options”.
   1. You may have to select “Show All Options” to see the “Debug Mode” option.
3. Start a copy. The SOQL query causing the issue will appear in the command line window.
4. Copy the SOQL and save it to a file.

## Step 2: Run the SOQL Query in the Salesforce Console

1. Login to the Salesforce GUI.
2. Choose “Developer Console” in the menu that appears when you click on your name.
3. Paste the SOQL query into the editor.
4. Press the execute button.
5. Copy the error text and save it.
   1. The error should appear in the lower part of the screen.

## Step 3: Submit a Support Case to Salesforce

* Describe what you did in Step 3.
* Include the problem SOQL and the error text from Step 3.

First level support can rarely solve this sort of issue and you should expect a request to grant access to your system so Salesforce engineers can reproduce the error.

## Why Does This Type of Error Happen?

Though we do not see this error often, it has appeared a few times when Salesforce index corruption of their Oracle database caused the issue. Truthfully we cannot know the precise root cause unless Salesforce exposes it — to any application it is only exposed as a type of error that Salesforce does not expect to occur.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learn.capstorm.com/reference/configuration-files/how-to-solve-unknown_exception-errors.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
