@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.js CHANGED
@@ -19169,12 +19169,12 @@ var isResponse2 = (response) => typeof response === "object" && response !== nul
19169
19169
  var import_react_intl39 = require("react-intl");
19170
19170
  var useErrorResponse = () => {
19171
19171
  const { formatMessage } = (0, import_react_intl39.useIntl)();
19172
- return async (response, fetchType) => {
19172
+ return async (response, fetchType, isInitialRequest) => {
19173
19173
  try {
19174
19174
  const errorResponse = await parseErrorResponse(response);
19175
19175
  return errorResponse;
19176
19176
  } catch (error) {
19177
- if (fetchType === "submission") {
19177
+ if (fetchType === "submission" && !isInitialRequest) {
19178
19178
  return { error: formatMessage(generic_error_messages_default.genericErrorRetryHint) };
19179
19179
  }
19180
19180
  throw error;
@@ -19324,7 +19324,8 @@ var DynamicFlowComponent = ({
19324
19324
  return;
19325
19325
  }
19326
19326
  if (!response.ok) {
19327
- const errorResponse = await getErrorResponse(response, fetchType);
19327
+ const isInitialRequest = step === void 0;
19328
+ const errorResponse = await getErrorResponse(response, fetchType, isInitialRequest);
19328
19329
  void updateAfterError(errorResponse);
19329
19330
  return;
19330
19331
  }