Skip to content

Commit

Permalink
Fix error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Dor-Karni committed Dec 14, 2021
1 parent 18118b6 commit 4aa852c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions cloudapp/src/app/catalog/main/main.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export class CatalogMainComponent implements AfterViewInit {
} },
error: e => {
this.loading = false;
console.log(e.message);
console.log(e);
this.alert.error(e.message, {keepAfterRouteChange:true});
},
complete: () => this.loading = false
Expand Down Expand Up @@ -318,7 +318,7 @@ export class CatalogMainComponent implements AfterViewInit {
},
error: e => {
this.loading = false;
console.log(e.message);
console.log(e);
this.alert.error(e.message, {keepAfterRouteChange:true});
},
complete: () => this.loading = false
Expand Down Expand Up @@ -348,7 +348,7 @@ export class CatalogMainComponent implements AfterViewInit {
error: e => {
this.loading = false;
console.log(e);
this.alert.error(e, {keepAfterRouteChange:true});
this.alert.error(e.message, {keepAfterRouteChange:true});
},
complete: () => this.loading = false
});
Expand Down
2 changes: 1 addition & 1 deletion cloudapp/src/app/holdings/form/form.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export class FormComponent implements OnInit {
},
error: e => {
this.loading = false;
console.log(e.message);
console.log(e);
this.alert.error(e.message, {keepAfterRouteChange:true});
},
complete: () => this.loading = false
Expand Down
6 changes: 3 additions & 3 deletions cloudapp/src/app/holdings/main/main.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export class MainComponent implements OnInit, OnDestroy {
},
error: e => {
this.loading = false;
console.log(e.message);
console.log(e);
this.alert.error(e.message, {keepAfterRouteChange:true});
},
complete: () => {
Expand All @@ -96,7 +96,7 @@ export class MainComponent implements OnInit, OnDestroy {
error: e => {
this.loading = false;
console.log(e);
this.alert.error(e, {keepAfterRouteChange:true});
this.alert.error(e.message, {keepAfterRouteChange:true});
},
complete: () => {
this.loading = false;
Expand Down Expand Up @@ -140,7 +140,7 @@ export class MainComponent implements OnInit, OnDestroy {
},
error: e => {
this.loading = false;
console.log(e.message);
console.log(e);
this.alert.error(e.message, { keepAfterRouteChange: true });
},
complete: () => this.loading = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export class HoldingsComponent implements OnInit {
},
error: e => {
this.loading = false;
console.log(e.message);
console.log(e);
this.alert.error(e.message, {keepAfterRouteChange:true});
},
complete: () => this.loading = false
Expand Down Expand Up @@ -177,7 +177,7 @@ export class HoldingsComponent implements OnInit {
},
error: e => {
this.loading = false;
console.log(e.message);
console.log(e);
this.alert.error(e.message, {keepAfterRouteChange:true});
},
complete: () => this.loading = false
Expand Down
6 changes: 3 additions & 3 deletions cloudapp/src/app/service/catalog.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,17 +132,17 @@ export class CatalogService extends BaseService {
case (SearchType.Monographs):
case (SearchType.Serials):
if(this.isEmpty(integrationProfile.repositoryImportProfile)){
throw "The Repository Import Profile is not configured correctly";
throw new Error("The Repository Import Profile is not configured correctly");
}
return { typeTag: "bib", urlType: "", ID: integrationProfile.repositoryImportProfile };
case (SearchType.Names):
if(this.isEmpty(integrationProfile.authorityImportProfileNames)){
throw "The Authority Import Profile Names is not configured correctly";
throw new Error("The Authority Import Profile Names is not configured correctly");
}
return { typeTag: "authority", urlType: "/authorities", ID: integrationProfile.authorityImportProfileNames };
case (SearchType.UniformTitles):
if(this.isEmpty(integrationProfile.authorityImportProfileUniformTitles)){
throw "The Authority Import Profile Uniform Titles is not configured correctly";
throw new Error("The Authority Import Profile Uniform Titles is not configured correctly");
}
return { typeTag: "authority", urlType: "/authorities", ID: integrationProfile.authorityImportProfileUniformTitles};
}
Expand Down

0 comments on commit 4aa852c

Please sign in to comment.