Skip to content

Commit b6cd7ad

Browse files
authored
Fix Error message for many requests (hobbyfarm#238)
1 parent 2e54a82 commit b6cd7ad

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

src/app/configuration/vmtemplates/edit-vmtemplate/edit-vmtemplate.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ export class EditVmtemplateComponent implements OnInit, OnChanges {
202202
},
203203
error: (e: HttpErrorResponse) => {
204204
this.alert.danger(
205-
'Error saving VM Template: ' + e.error.message,
205+
'Error saving VM Template: ' + e.message,
206206
false,
207207
DEFAULT_ALERT_ERROR_DURATION,
208208
);
@@ -219,7 +219,7 @@ export class EditVmtemplateComponent implements OnInit, OnChanges {
219219
},
220220
error: (e: HttpErrorResponse) => {
221221
this.alert.danger(
222-
'Error saving VM Template: ' + e.error.message,
222+
'Error saving VM Template: ' + e.message,
223223
false,
224224
DEFAULT_ALERT_ERROR_DURATION,
225225
);

src/app/configuration/vmtemplates/vmtemplates.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export class VmtemplatesComponent implements OnInit {
8585
},
8686
error: (e: HttpErrorResponse) => {
8787
const alertMsg =
88-
'Error deleting virtual machine template: ' + e.error.message;
88+
'Error deleting virtual machine template: ' + e.message;
8989
this.alert.danger(alertMsg, false, DEFAULT_ALERT_ERROR_DURATION);
9090
},
9191
});

src/app/course/course-wizard/course-wizard.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ export class CourseWizardComponent implements OnChanges, OnInit {
272272
},
273273
(e: HttpErrorResponse) => {
274274
this.alertDanger(
275-
'Error listing dynmamic scenarios: ' + e.error.message,
275+
'Error listing dynmamic scenarios: ' + e.message,
276276
);
277277
},
278278
);
@@ -348,7 +348,7 @@ export class CourseWizardComponent implements OnChanges, OnInit {
348348
this.coursesRefresher.emit();
349349
},
350350
(e: HttpErrorResponse) => {
351-
this.alertText = 'Error creating object: ' + e.error.message;
351+
this.alertText = 'Error creating object: ' + e.message;
352352
this.isAlert = true;
353353
},
354354
);
@@ -363,7 +363,7 @@ export class CourseWizardComponent implements OnChanges, OnInit {
363363
this.coursesRefresher.emit();
364364
},
365365
(e: HttpErrorResponse) => {
366-
this.alertText = 'Error creating object: ' + e.error.message;
366+
this.alertText = 'Error creating object: ' + e.message;
367367
this.isAlert = true;
368368
},
369369
);

src/app/course/course.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export class CourseComponent implements OnInit {
111111
this.selectedCourse = null;
112112
},
113113
error: (e: HttpErrorResponse) => {
114-
const alertMsg = 'Error deleting object: ' + e.error.message;
114+
const alertMsg = 'Error deleting object: ' + e.message;
115115
this.alert.danger(alertMsg, true, DEFAULT_ALERT_ERROR_DURATION);
116116
},
117117
});

src/app/scenario/scenario.component.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export class ScenarioComponent implements OnInit {
5252
this.selectedscenario = s;
5353
},
5454
error: (e: HttpErrorResponse) => {
55-
const alertMsg = 'Error retrieving object: ' + e.error.message;
55+
const alertMsg = 'Error retrieving object: ' + e.message;
5656
this.alert.danger(alertMsg, true, DEFAULT_ALERT_ERROR_DURATION);
5757
},
5858
});
@@ -67,7 +67,7 @@ export class ScenarioComponent implements OnInit {
6767
this.scenarioService.get(scenario.id).subscribe({
6868
next: (scenario) => (this.selectedscenario = scenario),
6969
error: (e: HttpErrorResponse) => {
70-
const alertMsg = 'Error deleting object: ' + e.error.message;
70+
const alertMsg = 'Error deleting object: ' + e.message;
7171
this.alert.danger(alertMsg, true, DEFAULT_ALERT_ERROR_DURATION);
7272
},
7373
});
@@ -82,7 +82,7 @@ export class ScenarioComponent implements OnInit {
8282
this.scenarioService.list(true).subscribe({
8383
next: (sList: Scenario[]) => (this.filteredScenarios = sList),
8484
error: (e: HttpErrorResponse) => {
85-
const alertMsg = 'Error listing objects: ' + e.error.message;
85+
const alertMsg = 'Error listing objects: ' + e.message;
8686
this.alert.danger(alertMsg, true, DEFAULT_ALERT_ERROR_DURATION);
8787
},
8888
});
@@ -96,7 +96,7 @@ export class ScenarioComponent implements OnInit {
9696
this.refresh();
9797
},
9898
error: (e: HttpErrorResponse) => {
99-
const alertMsg = 'Error cloning scenario: ' + e.error.message;
99+
const alertMsg = 'Error cloning scenario: ' + e.message;
100100
this.alert.danger(alertMsg, true, DEFAULT_ALERT_ERROR_DURATION);
101101
},
102102
})
@@ -110,7 +110,7 @@ export class ScenarioComponent implements OnInit {
110110
this.refresh();
111111
},
112112
error: (e: HttpErrorResponse) => {
113-
const alertMsg = 'Error deleting object: ' + e.error.message;
113+
const alertMsg = 'Error deleting object: ' + e.message;
114114
this.alert.danger(alertMsg, true, DEFAULT_ALERT_ERROR_DURATION);
115115
},
116116
});

0 commit comments

Comments
 (0)