@bigbinary/neeto-commons-frontend 2.1.2 → 2.1.4
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/initializers.cjs.js +6 -9
- package/initializers.cjs.js.map +1 -1
- package/initializers.js +4 -7
- package/initializers.js.map +1 -1
- package/package.json +1 -1
- package/pure.d.ts +59 -8
- package/react-utils.cjs.js +5 -2
- package/react-utils.cjs.js.map +1 -1
- package/react-utils.d.ts +3 -3
- package/react-utils.js +5 -2
- package/react-utils.js.map +1 -1
package/initializers.js
CHANGED
|
@@ -6,6 +6,7 @@ import { serializeKeysToSnakeCase, keysToCamelCase, matches, deepFreezeObject }
|
|
|
6
6
|
import { resetAuthTokens } from '@bigbinary/neeto-commons-frontend/utils';
|
|
7
7
|
import { Toastr } from '@bigbinary/neetoui';
|
|
8
8
|
import { evolve, omit, values, mergeDeepLeft, curry, mergeAll, either, isEmpty, isNil } from 'ramda';
|
|
9
|
+
import { HEADERS_KEYS } from 'constants/axios';
|
|
9
10
|
import { initReactI18next } from 'react-i18next';
|
|
10
11
|
import Logger from 'js-logger';
|
|
11
12
|
import mixpanel from 'mixpanel-browser';
|
|
@@ -51,12 +52,6 @@ function _defineProperty(obj, key, value) {
|
|
|
51
52
|
return obj;
|
|
52
53
|
}
|
|
53
54
|
|
|
54
|
-
var HEADERS_KEYS = {
|
|
55
|
-
xCsrfToken: "X-CSRF-TOKEN",
|
|
56
|
-
contentType: "Content-Type",
|
|
57
|
-
accept: "Accept"
|
|
58
|
-
};
|
|
59
|
-
|
|
60
55
|
var shouldNot = function shouldNot(skip) {
|
|
61
56
|
return _typeof$1(skip) === "object" || !skip;
|
|
62
57
|
};
|
|
@@ -174,7 +169,9 @@ var handle404ErrorResponse = function handle404ErrorResponse(error) {
|
|
|
174
169
|
if (status === 404 && show404ErrorPage || status === 403 && show403ErrorPage) {
|
|
175
170
|
useErrorDisplayStore.setState({
|
|
176
171
|
showErrorPage: true,
|
|
177
|
-
statusCode: status
|
|
172
|
+
statusCode: status,
|
|
173
|
+
failedApiUrl: error.config.url,
|
|
174
|
+
failedApiPath: new URL(error.config.url).pathname
|
|
178
175
|
});
|
|
179
176
|
}
|
|
180
177
|
return error;
|