Fixed assessment error handling (#16610)

Displaying striped files in sts
This commit is contained in:
Aasim Khan
2021-08-06 23:01:56 -07:00
committed by GitHub
parent 0f229b3444
commit f1b9931116
3 changed files with 35 additions and 19 deletions

View File

@@ -190,15 +190,15 @@ export class MigrationStateModel implements Model, vscode.Disposable {
try {
this._assessmentApiResponse = (await this.migrationService.getAssessments(ownerUri, this._databaseAssessment))!;
this._assessmentResults = {
issues: this._assessmentApiResponse.assessmentResult.items,
databaseAssessments: this._assessmentApiResponse.assessmentResult.databases.map(d => {
issues: this._assessmentApiResponse?.assessmentResult?.items ?? [],
databaseAssessments: this._assessmentApiResponse?.assessmentResult?.databases?.map(d => {
return {
name: d.name,
issues: d.items,
errors: d.errors
};
}),
errors: this._assessmentApiResponse.errors
}) ?? [],
errors: this._assessmentApiResponse?.errors ?? []
};
} catch (error) {
this._assessmentResults = {