conductor-node 7.4.5 → 7.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -6
- package/dist/package.json +1 -1
- package/dist/src/Client.js +10 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -120,11 +120,13 @@ The response includes the following:
|
|
|
120
120
|
|
|
121
121
|
```ts
|
|
122
122
|
{
|
|
123
|
-
// Whether we can connect to the end-user's
|
|
124
|
-
isConnected: false
|
|
125
|
-
// If `isConnected=false`,
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
123
|
+
// Whether we can connect to the end-user's QuickBooks Desktop.
|
|
124
|
+
isConnected: false,
|
|
125
|
+
// If `isConnected=false`, an `error` like the following will exist:
|
|
126
|
+
error: {
|
|
127
|
+
code: "QBWC_CONNECTION_ERROR",
|
|
128
|
+
developerMessage: "QBWC Error 0x80040408: Could not start QuickBooks.",
|
|
129
|
+
endUserMessage: "An error occurred while connecting to QuickBooks Desktop. Please ensure QuickBooks Desktop is running and the correct company file is open, then try again.",
|
|
130
|
+
}
|
|
129
131
|
}
|
|
130
132
|
```
|
package/dist/package.json
CHANGED
package/dist/src/Client.js
CHANGED
|
@@ -115,12 +115,16 @@ class Client {
|
|
|
115
115
|
if (error instanceof graphql_request_1.ClientError) {
|
|
116
116
|
const { response } = error;
|
|
117
117
|
if ([404, 502, 503].includes(response.status)) {
|
|
118
|
-
throw new Error(`The server returned a ${response.status} error, which may indicate that the server is down. Please alert the Conductor team if this error persists.`);
|
|
118
|
+
throw new Error(`The Conductor server returned a ${response.status} error, which may indicate that the server is down. Please alert the Conductor team if this error persists.`);
|
|
119
119
|
}
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
120
|
+
const nestedError = response.errors?.[0];
|
|
121
|
+
if (nestedError?.extensions["code"] === "GRAPHQL_VALIDATION_FAILED") {
|
|
122
|
+
throw new Error(`The Conductor server is no longer compatible with your version of "${package_json_1.default.name}". Please run "yarn upgrade ${package_json_1.default.name}@latest --latest" to update.`);
|
|
123
|
+
}
|
|
124
|
+
const errorMessage = nestedError?.message ??
|
|
125
|
+
// Though `ClientError.response.error` is *not* defined in the type
|
|
126
|
+
// definition, we've seen it occur (e.g., attempting to access the
|
|
127
|
+
// `development` environment when `ngrok` is not running locally).
|
|
124
128
|
response["error"];
|
|
125
129
|
if (errorMessage !== undefined) {
|
|
126
130
|
throw new Error(errorMessage);
|
|
@@ -138,7 +142,7 @@ class Client {
|
|
|
138
142
|
.toString()
|
|
139
143
|
.trim();
|
|
140
144
|
if (currentVersion !== latestVersion) {
|
|
141
|
-
console.warn(chalk_1.default.yellow(`⚠️ A new version of Conductor is available! You are using ${package_json_1.default.name} version ${currentVersion} but the latest version is ${latestVersion}. Please run "yarn
|
|
145
|
+
console.warn(chalk_1.default.yellow(`⚠️ A new version of Conductor is available! You are using "${package_json_1.default.name}" version ${currentVersion} but the latest version is ${latestVersion}. Please run "yarn upgrade ${package_json_1.default.name} --latest" to update.`));
|
|
142
146
|
}
|
|
143
147
|
}
|
|
144
148
|
}
|
package/package.json
CHANGED