@trackunit/react-core-contexts 0.4.92 → 0.4.94
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/index.cjs +14 -1
- package/index.js +14 -1
- package/package.json +2 -2
package/index.cjs
CHANGED
|
@@ -116,8 +116,21 @@ const ManagerApolloProvider = ({ children, isIrisApp }) => {
|
|
|
116
116
|
});
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
const invalidToken = (_b = errorResponse.graphQLErrors) === null || _b === void 0 ? void 0 : _b.some(x => {
|
|
119
|
+
const invalidToken = (_b = errorResponse.graphQLErrors) === null || _b === void 0 ? void 0 : _b.some(x => {
|
|
120
|
+
var _a, _b, _c;
|
|
121
|
+
return ((_a = x === null || x === void 0 ? void 0 : x.extensions) === null || _a === void 0 ? void 0 : _a.code) === "UNAUTHENTICATED" ||
|
|
122
|
+
((_b = x === null || x === void 0 ? void 0 : x.message) === null || _b === void 0 ? void 0 : _b.includes("Invalid token specified")) ||
|
|
123
|
+
((_c = x === null || x === void 0 ? void 0 : x.message) === null || _c === void 0 ? void 0 : _c.includes("Access denied! You need to be authorized to perform this action!"));
|
|
124
|
+
});
|
|
120
125
|
if (invalidToken) {
|
|
126
|
+
Sentry__namespace.captureException({
|
|
127
|
+
category: "GraphQL",
|
|
128
|
+
message: "GraphQL Error - invalidToken",
|
|
129
|
+
level: "warning",
|
|
130
|
+
data: {
|
|
131
|
+
log: JSON.stringify(errorResponse.graphQLErrors),
|
|
132
|
+
},
|
|
133
|
+
});
|
|
121
134
|
window.location.replace(`${publicUrl}logout`);
|
|
122
135
|
}
|
|
123
136
|
if (errorResponse.networkError) {
|
package/index.js
CHANGED
|
@@ -92,8 +92,21 @@ const ManagerApolloProvider = ({ children, isIrisApp }) => {
|
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
const invalidToken = (_b = errorResponse.graphQLErrors) === null || _b === void 0 ? void 0 : _b.some(x => {
|
|
95
|
+
const invalidToken = (_b = errorResponse.graphQLErrors) === null || _b === void 0 ? void 0 : _b.some(x => {
|
|
96
|
+
var _a, _b, _c;
|
|
97
|
+
return ((_a = x === null || x === void 0 ? void 0 : x.extensions) === null || _a === void 0 ? void 0 : _a.code) === "UNAUTHENTICATED" ||
|
|
98
|
+
((_b = x === null || x === void 0 ? void 0 : x.message) === null || _b === void 0 ? void 0 : _b.includes("Invalid token specified")) ||
|
|
99
|
+
((_c = x === null || x === void 0 ? void 0 : x.message) === null || _c === void 0 ? void 0 : _c.includes("Access denied! You need to be authorized to perform this action!"));
|
|
100
|
+
});
|
|
96
101
|
if (invalidToken) {
|
|
102
|
+
Sentry.captureException({
|
|
103
|
+
category: "GraphQL",
|
|
104
|
+
message: "GraphQL Error - invalidToken",
|
|
105
|
+
level: "warning",
|
|
106
|
+
data: {
|
|
107
|
+
log: JSON.stringify(errorResponse.graphQLErrors),
|
|
108
|
+
},
|
|
109
|
+
});
|
|
97
110
|
window.location.replace(`${publicUrl}logout`);
|
|
98
111
|
}
|
|
99
112
|
if (errorResponse.networkError) {
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-core-contexts",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.94",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"graphql": "^15.8.0",
|
|
8
8
|
"@trackunit/iris-app-runtime-core": "0.3.23",
|
|
9
9
|
"@trackunit/react-core-contexts-api": "0.2.20",
|
|
10
|
-
"@trackunit/react-core-contexts-test": "0.1.
|
|
10
|
+
"@trackunit/react-core-contexts-test": "0.1.36",
|
|
11
11
|
"@trackunit/react-core-hooks": "0.2.33",
|
|
12
12
|
"react": "18.2.0",
|
|
13
13
|
"@apollo/client": "3.7.10",
|