Skip to main content
One of the most complicated aspects of QuickBooks Desktop is its error handling. QuickBooks errors are often cryptic and unhelpful, and they can arise from several sources (e.g., Web Connector, QB request processor, QuickBooks Desktop itself), each using a different format and mechanism. Sometimes, their errors do not even describe what went wrong when they could! Conductor unifies and simplifies these errors into a single, consistent error format and augments each with our own user-friendly language that describes how to resolve the issue. With Conductor, every error includes plenty of useful information.

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:
  1. error.message: The primary error message. Log it for debugging, and use it in developer/admin surfaces or test projects.
  2. error.userFacingMessage: The user-friendly message we recommend showing to end-users. It may match error.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.
For example, this invalid API key error keeps developer-only detail in 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. Using async/await:
Or in the form of a rejected promise:

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 as app.use((error, ...) => { ... }) in Express. Within this handler, perform the following actions:
  1. For any ConductorError instance, display the error.userFacingMessage property to the end-user in your app’s UI while logging the complete error object. The primary error.message is also useful for logs, developer/admin surfaces, and test projects.
  2. For all ConductorError instances, 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 ConductorError instances, such as an invalid API key.
For example, using an Express error handler: