Skip to content

Commit

Permalink
Fix bug with error handling and await for context.sync()
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhinav Rau committed Aug 22, 2024
1 parent d3ac557 commit 8268766
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/search_runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export async function getSearchConfig() {
const worksheetName = currentWorksheet.name;
const configTable = currentWorksheet.tables.getItem(`${worksheetName}.ConfigTable`);
const valueColumn = getColumn(configTable, "Value");
await context.sync();


config = {
vertexAISearchProjectNumber: valueColumn.values[1][0],
Expand Down
4 changes: 2 additions & 2 deletions src/synthetic_qa_runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export async function getSyntheticQAConfig() {
const worksheetName = currentWorksheet.name;
const configTable = currentWorksheet.tables.getItem(`${worksheetName}.ConfigTable`);
const valueColumn = getColumn(configTable, "Value");
await context.sync();


config = {
vertexAIProjectID: valueColumn.values[1][0],
Expand Down Expand Up @@ -220,7 +220,7 @@ async function processResponse(rowNum, output, generatedQuestionColumn, expected
cell_status.format.fill.color = '#FFCCCB';
cell_status.values = [["Failed. Error: " + err.message]];
} finally {
context.sync();
await context.sync();
}


Expand Down

0 comments on commit 8268766

Please sign in to comment.