> For the complete documentation index, see [llms.txt](https://help.security.gallagher.com/knowledge-hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.security.gallagher.com/knowledge-hub/products/cc-software/configure/interface-options/api/controller-api-ftcapi-and-middleware-f/controller-api-ftcapi-error-messages.md).

# Controller API - FTCAPI error messages

Diagnose Controller API and middleware registration, port, and certificate errors.

## Enable logging first

Edit `C:\Program Files (x86)\Gallagher\FTCAPI\Middleware Framework\FTCAPIRouterService.exe.config` and change:

```xml
<!--<add name="Debug" />-->
```

to:

```xml
<add name="Debug" />
```

If needed, save the file to the desktop and move it back. Restart the FTCAPI Router service, then read `…\Middleware Framework\Log\FMF.log`.

## Error reference

| Error                                                 | Cause and fix                                                                                                                                                                                                                                          |
| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `80040154 Class not registered (REGDB_E_CLASSNOTREG)` | FTCAPI not installed correctly. Register the DLL as Administrator: `regsvr32 "…\Gallagher FTCAPI\CardaxFTCAPI.dll"` (7.80+: `GallagherFTCAPI.dll`), or `regsvr32 "…\Middleware Framework\GallagherFTCAPI.dll"`.                                        |
| `80004005 (E_FAIL)`                                   | Listen port not configured or in use. Confirm a serial port exists, or run `netstat -ano` to find the network port in use.                                                                                                                             |
| `0xC12E0001`                                          | **FMF:** certificate (`.pem`) not imported, or no `GallagherFTCAPI.ini` in `…\Middleware Framework\`. **FTCAPI:** create the External System server, import the PEM, export the ini to `…\Gallagher FTCAPI\`, and set up the External System and item. |
| "External component has thrown an exception"          | Typically the FTCAPI Middleware is installed but misconfigured.                                                                                                                                                                                        |

***

🔗 **Related**

* [Controller API - FTCAPI.ini File](/knowledge-hub/products/cc-software/configure/interface-options/api/controller-api-ftcapi-and-middleware-f/controller-api-ftcapi.ini-file.md). The `0xC12E0001` fix.
* [Controller API - Fault Finding using the Test Harness](/knowledge-hub/products/cc-software/configure/interface-options/api/controller-api-ftcapi-and-middleware-f/controller-api-fault-finding-using-the-test-harness.md). Isolate the comms path.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.security.gallagher.com/knowledge-hub/products/cc-software/configure/interface-options/api/controller-api-ftcapi-and-middleware-f/controller-api-ftcapi-error-messages.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
