conductor-node 4.0.4 → 4.0.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 +2 -2
- package/dist/src/Client.js +6 -3
- package/package.json +2 -2
package/dist/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "conductor-node",
|
|
3
|
-
"version": "4.0.
|
|
4
|
-
"description": "Easily integrate with the entire QuickBooks Desktop API with fully-
|
|
3
|
+
"version": "4.0.6",
|
|
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",
|
|
7
7
|
"type": "commonjs",
|
package/dist/src/Client.js
CHANGED
|
@@ -88,14 +88,17 @@ class Client {
|
|
|
88
88
|
catch (error) {
|
|
89
89
|
if (this.verbose) {
|
|
90
90
|
console.timeEnd("Request time");
|
|
91
|
-
console.log(JSON.stringify(error, undefined, 2));
|
|
92
91
|
}
|
|
93
92
|
if (error instanceof graphql_request_1.ClientError) {
|
|
94
|
-
const
|
|
93
|
+
const { response } = error;
|
|
94
|
+
if ([404, 502, 503].includes(response.status)) {
|
|
95
|
+
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.`);
|
|
96
|
+
}
|
|
97
|
+
const errorMessage = response.errors?.[0]?.message ??
|
|
95
98
|
// Though the property `ClientError.response.error` does *not* exist,
|
|
96
99
|
// we've seen it occur (e.g., attempting to access `development`
|
|
97
100
|
// environment when `ngrok` is not running locally).
|
|
98
|
-
|
|
101
|
+
response["error"];
|
|
99
102
|
if (errorMessage !== undefined) {
|
|
100
103
|
throw new Error(errorMessage);
|
|
101
104
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "conductor-node",
|
|
3
|
-
"version": "4.0.
|
|
4
|
-
"description": "Easily integrate with the entire QuickBooks Desktop API with fully-
|
|
3
|
+
"version": "4.0.6",
|
|
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",
|
|
7
7
|
"type": "commonjs",
|