conductor-node 9.4.0 → 9.4.2
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
|
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.wrapError = exports.getDurationString = exports.graphqlOperationWrapper = exports.wrapGraphqlOperations = void 0;
|
|
7
|
-
const package_json_1 = __importDefault(require("../../package.json"));
|
|
8
7
|
const error_1 = require("../utils/error");
|
|
9
8
|
const graphql_request_1 = require("graphql-request");
|
|
10
9
|
const node_util_1 = __importDefault(require("node:util"));
|
|
@@ -77,13 +76,6 @@ function wrapError(error) {
|
|
|
77
76
|
const nestedError = response.errors?.[0];
|
|
78
77
|
const errorExtensions = nestedError?.extensions;
|
|
79
78
|
if (errorExtensions) {
|
|
80
|
-
if (errorExtensions["code"] === "GRAPHQL_VALIDATION_FAILED") {
|
|
81
|
-
return new error_1.ConductorInvalidRequestError({
|
|
82
|
-
code: "CLIENT_OUTDATED",
|
|
83
|
-
message: `Your version of "${package_json_1.default.name}" is not longer compatible with the Conductor server. Please run "yarn upgrade ${package_json_1.default.name} --latest" to update.`,
|
|
84
|
-
httpStatusCode: response.status,
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
79
|
// Do *not* bother validating if this error is a Conductor error:
|
|
88
80
|
// 1. We know this is a `ClientError`, so `message` and `httpStatusCode`
|
|
89
81
|
// exist.
|
package/dist/src/utils/error.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/* eslint-disable max-classes-per-file -- Use one module for all error classes. */
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
exports.generateConductorErrorFromType = exports.ConductorUnknownError = exports.ConductorInternalError = exports.ConductorConnectionError = exports.ConductorAuthenticationError = exports.ConductorInvalidRequestError = exports.ConductorIntegrationConnectionError = exports.ConductorIntegrationError = exports.ConductorError = exports.DEFAULT_END_USER_MESSAGE = void 0;
|
|
4
|
-
|
|
5
|
-
// Matches server-side default value.
|
|
5
|
+
// Matches server-side value.
|
|
6
6
|
exports.DEFAULT_END_USER_MESSAGE = "An internal server error occurred. Please try again later.";
|
|
7
7
|
/**
|
|
8
8
|
* The base error from which all other more specific Conductor errors derive.
|
package/package.json
CHANGED