Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/utils/featheryClient/integrationClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import {
} from '@feathery/client-utils';
import { handleFormConflict } from './utils';

import { v4 as uuidv4 } from 'uuid';

export const TYPE_MESSAGES_TO_IGNORE = [
// e.g. https://sentry.io/organizations/feathery-forms/issues/3571287943/
'Failed to fetch',
Expand Down Expand Up @@ -438,10 +440,12 @@ export default class IntegrationClient {

async generateQuikEnvelopes(action: Record<string, string>) {
const { userId } = initInfo();
const submissionId = uuidv4();
const payload: Record<string, any> = {
form_key: this.formKey,
fuser_key: userId,
run_async: true,
instance_id: submissionId,
...action
};

Expand Down Expand Up @@ -479,7 +483,7 @@ export default class IntegrationClient {
return await new Promise((resolve) => {
let attempts = 0;
const maxAttempts = this.QUIK_MAX_TIME / this.QUIK_CHECK_INTERVAL;
const pollUrl = `${STATIC_URL}quik/document/poll/?fuser_key=${userId}`;
const pollUrl = `${STATIC_URL}quik/document/poll/?fuser_key=${userId}&instance_id=${submissionId}`;

const checkCompletion = async () => {
const response = await this._fetch(pollUrl);
Expand Down