Skip to content

Commit

Permalink
Fix Error message for many requests (#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
jggoebel authored Jan 2, 2025
1 parent 2e54a82 commit b6cd7ad
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export class EditVmtemplateComponent implements OnInit, OnChanges {
},
error: (e: HttpErrorResponse) => {
this.alert.danger(
'Error saving VM Template: ' + e.error.message,
'Error saving VM Template: ' + e.message,
false,
DEFAULT_ALERT_ERROR_DURATION,
);
Expand All @@ -219,7 +219,7 @@ export class EditVmtemplateComponent implements OnInit, OnChanges {
},
error: (e: HttpErrorResponse) => {
this.alert.danger(
'Error saving VM Template: ' + e.error.message,
'Error saving VM Template: ' + e.message,
false,
DEFAULT_ALERT_ERROR_DURATION,
);
Expand Down
2 changes: 1 addition & 1 deletion src/app/configuration/vmtemplates/vmtemplates.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class VmtemplatesComponent implements OnInit {
},
error: (e: HttpErrorResponse) => {
const alertMsg =
'Error deleting virtual machine template: ' + e.error.message;
'Error deleting virtual machine template: ' + e.message;
this.alert.danger(alertMsg, false, DEFAULT_ALERT_ERROR_DURATION);
},
});
Expand Down
6 changes: 3 additions & 3 deletions src/app/course/course-wizard/course-wizard.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ export class CourseWizardComponent implements OnChanges, OnInit {
},
(e: HttpErrorResponse) => {
this.alertDanger(
'Error listing dynmamic scenarios: ' + e.error.message,
'Error listing dynmamic scenarios: ' + e.message,
);
},
);
Expand Down Expand Up @@ -348,7 +348,7 @@ export class CourseWizardComponent implements OnChanges, OnInit {
this.coursesRefresher.emit();
},
(e: HttpErrorResponse) => {
this.alertText = 'Error creating object: ' + e.error.message;
this.alertText = 'Error creating object: ' + e.message;
this.isAlert = true;
},
);
Expand All @@ -363,7 +363,7 @@ export class CourseWizardComponent implements OnChanges, OnInit {
this.coursesRefresher.emit();
},
(e: HttpErrorResponse) => {
this.alertText = 'Error creating object: ' + e.error.message;
this.alertText = 'Error creating object: ' + e.message;
this.isAlert = true;
},
);
Expand Down
2 changes: 1 addition & 1 deletion src/app/course/course.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export class CourseComponent implements OnInit {
this.selectedCourse = null;
},
error: (e: HttpErrorResponse) => {
const alertMsg = 'Error deleting object: ' + e.error.message;
const alertMsg = 'Error deleting object: ' + e.message;
this.alert.danger(alertMsg, true, DEFAULT_ALERT_ERROR_DURATION);
},
});
Expand Down
10 changes: 5 additions & 5 deletions src/app/scenario/scenario.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class ScenarioComponent implements OnInit {
this.selectedscenario = s;
},
error: (e: HttpErrorResponse) => {
const alertMsg = 'Error retrieving object: ' + e.error.message;
const alertMsg = 'Error retrieving object: ' + e.message;
this.alert.danger(alertMsg, true, DEFAULT_ALERT_ERROR_DURATION);
},
});
Expand All @@ -67,7 +67,7 @@ export class ScenarioComponent implements OnInit {
this.scenarioService.get(scenario.id).subscribe({
next: (scenario) => (this.selectedscenario = scenario),
error: (e: HttpErrorResponse) => {
const alertMsg = 'Error deleting object: ' + e.error.message;
const alertMsg = 'Error deleting object: ' + e.message;
this.alert.danger(alertMsg, true, DEFAULT_ALERT_ERROR_DURATION);
},
});
Expand All @@ -82,7 +82,7 @@ export class ScenarioComponent implements OnInit {
this.scenarioService.list(true).subscribe({
next: (sList: Scenario[]) => (this.filteredScenarios = sList),
error: (e: HttpErrorResponse) => {
const alertMsg = 'Error listing objects: ' + e.error.message;
const alertMsg = 'Error listing objects: ' + e.message;
this.alert.danger(alertMsg, true, DEFAULT_ALERT_ERROR_DURATION);
},
});
Expand All @@ -96,7 +96,7 @@ export class ScenarioComponent implements OnInit {
this.refresh();
},
error: (e: HttpErrorResponse) => {
const alertMsg = 'Error cloning scenario: ' + e.error.message;
const alertMsg = 'Error cloning scenario: ' + e.message;
this.alert.danger(alertMsg, true, DEFAULT_ALERT_ERROR_DURATION);
},
})
Expand All @@ -110,7 +110,7 @@ export class ScenarioComponent implements OnInit {
this.refresh();
},
error: (e: HttpErrorResponse) => {
const alertMsg = 'Error deleting object: ' + e.error.message;
const alertMsg = 'Error deleting object: ' + e.message;
this.alert.danger(alertMsg, true, DEFAULT_ALERT_ERROR_DURATION);
},
});
Expand Down

0 comments on commit b6cd7ad

Please sign in to comment.