@wise/dynamic-flow-client 3.11.7 → 3.11.8
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/build/main.mjs
CHANGED
|
@@ -19168,12 +19168,12 @@ var isResponse2 = (response) => typeof response === "object" && response !== nul
|
|
|
19168
19168
|
import { useIntl as useIntl25 } from "react-intl";
|
|
19169
19169
|
var useErrorResponse = () => {
|
|
19170
19170
|
const { formatMessage } = useIntl25();
|
|
19171
|
-
return async (response, fetchType) => {
|
|
19171
|
+
return async (response, fetchType, isInitialRequest) => {
|
|
19172
19172
|
try {
|
|
19173
19173
|
const errorResponse = await parseErrorResponse(response);
|
|
19174
19174
|
return errorResponse;
|
|
19175
19175
|
} catch (error) {
|
|
19176
|
-
if (fetchType === "submission") {
|
|
19176
|
+
if (fetchType === "submission" && !isInitialRequest) {
|
|
19177
19177
|
return { error: formatMessage(generic_error_messages_default.genericErrorRetryHint) };
|
|
19178
19178
|
}
|
|
19179
19179
|
throw error;
|
|
@@ -19323,7 +19323,8 @@ var DynamicFlowComponent = ({
|
|
|
19323
19323
|
return;
|
|
19324
19324
|
}
|
|
19325
19325
|
if (!response.ok) {
|
|
19326
|
-
const
|
|
19326
|
+
const isInitialRequest = step === void 0;
|
|
19327
|
+
const errorResponse = await getErrorResponse(response, fetchType, isInitialRequest);
|
|
19327
19328
|
void updateAfterError(errorResponse);
|
|
19328
19329
|
return;
|
|
19329
19330
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ErrorResponseBody } from '@wise/dynamic-flow-types';
|
|
2
|
-
export declare const useErrorResponse: () => (response: Response, fetchType: 'refresh' | 'submission') => Promise<ErrorResponseBody>;
|
|
2
|
+
export declare const useErrorResponse: () => (response: Response, fetchType: 'refresh' | 'submission', isInitialRequest: boolean) => Promise<ErrorResponseBody>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wise/dynamic-flow-client",
|
|
3
|
-
"version": "3.11.
|
|
3
|
+
"version": "3.11.8",
|
|
4
4
|
"description": "Dynamic Flow web client",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./build/main.min.js",
|
|
@@ -66,15 +66,15 @@
|
|
|
66
66
|
"nanoid": "5.0.7",
|
|
67
67
|
"npm-run-all2": "5.0.2",
|
|
68
68
|
"postcss": "^8.4.38",
|
|
69
|
-
"postcss-cli": "^
|
|
69
|
+
"postcss-cli": "^11.0.0",
|
|
70
70
|
"postcss-import": "^15.1.0",
|
|
71
71
|
"react": "18.3.1",
|
|
72
72
|
"react-dom": "18.3.1",
|
|
73
73
|
"react-intl": "6.6.8",
|
|
74
74
|
"storybook": "8.1.10",
|
|
75
75
|
"stylelint": "16.6.1",
|
|
76
|
-
"stylelint-config-standard": "36.0.
|
|
77
|
-
"stylelint-no-unsupported-browser-features": "
|
|
76
|
+
"stylelint-config-standard": "36.0.1",
|
|
77
|
+
"stylelint-no-unsupported-browser-features": "8.0.1",
|
|
78
78
|
"stylelint-value-no-unknown-custom-properties": "6.0.1",
|
|
79
79
|
"tsx": "4.15.6",
|
|
80
80
|
"typescript": "5.4.5",
|