Skip to content

Commit

Permalink
fix: Do not try to handle non form types (#631)
Browse files Browse the repository at this point in the history
  • Loading branch information
bryan-robitaille authored Apr 16, 2024
1 parent 27cba43 commit ea6b3fb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions aws/lambdas/code/reliability/lib/dataLayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ function handleType(
handleFileInputResponse(qTitle, response, collector);
break;
default:
console.error(JSON.stringify("Invalid Form Element Type" + question.type));
throw new Error(`Invalid Form Element Type ${question.type}`);
// Do not try to handle form elements like richText that do not have responses
break;
}
}

Expand Down Expand Up @@ -290,8 +290,8 @@ function handleDynamicForm(
handleArrayResponse(qTitle, (row as Record<string, Response>)[qIndex], rowCollector);
break;
default:
console.error(JSON.stringify("Invalid Form Element Type" + qItem.type));
throw new Error(`Invalid Form Element Type ${qItem.type}`);
// Do not try to handle form elements like richText that do not have responses
break;
}
});
rowCollector.unshift(`${String.fromCharCode(13)}***${rowLabel} ${rIndex + 1}***`);
Expand Down

0 comments on commit ea6b3fb

Please sign in to comment.