Error types
Any error object you receive will be an instance of one of the following error types:Common error codes
These error codes are accessible via the
error.code property of any
Conductor error. For integration-specific errors, you can also reference
error.integrationCode for the raw error code from QuickBooks Desktop.Error messages
Every Conductor error includes two message fields:error.message: The primary error message. Log it for debugging, and use it in developer/admin surfaces or test projects.error.userFacingMessage: The user-friendly message we recommend showing to end-users. It may matcherror.message, or it may mask details that are only useful to developers or administrators, such as invalid API keys, billing issues, or setup problems.
If your app already displays
error.userFacingMessage, no change is required.
We still recommend it for end-user UI. Use error.message for logs,
developer/admin surfaces, test projects, and other places where the primary
error detail is useful.message while masking userFacingMessage:
Example Conductor error object
Error handling in our SDKs
Our errors in our SDKs are a bit janky at the moment. We’re working on it. For now, we recommend the approach shown below for typing and unwrapping Conductor errors from our SDK. The example below is for our Node.js SDK, but the approach would be similar for our Python SDK.Check the connection status
Specific error handling
If you need special handling for specific errors, you can wrap individual API calls, as shown below. Usingasync/await:
Global error handling
It is unnecessary to wrap each API call individually, as demonstrated in the examples above. Instead, we suggest implementing a global error handler for your server, such asapp.use((error, ...) => { ... }) in Express. Within this handler, perform the following actions:
- For any
ConductorErrorinstance, display theerror.userFacingMessageproperty to the end-user in your app’s UI while logging the complete error object. The primaryerror.messageis also useful for logs, developer/admin surfaces, and test projects. - For all
ConductorErrorinstances, transmit the full error object to your error-tracking service (e.g., Sentry):- Send a warning for instances of
INTEGRATION_CONNECTION_ERROR, which are not actionable by you and can only be resolved by the end-user; for example, failure to connect to QuickBooks Desktop on the end-user’s computer. - Send an error for all other
ConductorErrorinstances, such as an invalid API key.
- Send a warning for instances of

