conductor-node 7.4.5 → 7.4.6

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/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conductor-node",
3
- "version": "7.4.5",
3
+ "version": "7.4.6",
4
4
  "description": "Easily integrate with the entire QuickBooks Desktop API with fully-typed async TypeScript",
5
5
  "author": "Danny Nemer <hi@DannyNemer.com>",
6
6
  "license": "MIT",
@@ -115,9 +115,13 @@ 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 errorMessage = response.errors?.[0]?.message ??
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 add ${package_json_1.default.name}@latest" to update.`);
123
+ }
124
+ const errorMessage = nestedError?.message ??
121
125
  // Though the property `ClientError.response.error` does *not* exist,
122
126
  // we've seen it occur (e.g., attempting to access `development`
123
127
  // environment when `ngrok` is not running locally).
@@ -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 add ${package_json_1.default.name}@latest" to update.`));
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 add ${package_json_1.default.name}@latest" to update.`));
142
146
  }
143
147
  }
144
148
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conductor-node",
3
- "version": "7.4.5",
3
+ "version": "7.4.6",
4
4
  "description": "Easily integrate with the entire QuickBooks Desktop API with fully-typed async TypeScript",
5
5
  "author": "Danny Nemer <hi@DannyNemer.com>",
6
6
  "license": "MIT",