Skip to content

Commit

Permalink
Handle errors that are found async when creating the model
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwanthkumar-avalara committed Jul 6, 2020
1 parent 63df852 commit 748eac5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion frontend/TrainingView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ async function createModel(automlClient: AutoMLClient, modelName: string, datase
} else {
console.log("Found an existing Operation for Model Training, so using that to track progress: " + operationId);
}
await automlClient.waitForActiveOperationToComplete(projectId, operationId);
try {
await automlClient.waitForActiveOperationToComplete(projectId, operationId);
} catch (e) {
console.log(e);
setErrorMessage(e.error.message);
}
}

export function TrainingView({ appState, setAppState }) {
Expand Down

0 comments on commit 748eac5

Please sign in to comment.