Revision 57494
Added by Konstantina Galouni over 4 years ago
dataProvider.component.ts | ||
---|---|---|
130 | 130 |
this.datasourceId = data['datasourceId']; |
131 | 131 |
if (this.datasourceId) { |
132 | 132 |
this.getDataProviderInfo(this.datasourceId); |
133 |
} else { |
|
134 |
this.showLoading = false; |
|
135 |
this._router.navigate(['/error'], {queryParams: {"page": this.properties.searchLinkToDataProvider + this.datasourceId, "page_type": "dataprovider"}}); |
|
133 | 136 |
} |
134 | 137 |
|
135 | 138 |
HelperFunctions.scroll(); |
... | ... | |
200 | 203 |
err => { |
201 | 204 |
//console.log(err); |
202 | 205 |
this.handleError("Error getting content provider for id: " + this.datasourceId, err); |
203 |
this.errorMessage = 'No dataProvider found'; |
|
206 |
if(err.status == 404) { |
|
207 |
this._router.navigate(['/error'], {queryParams: {"page": this.properties.searchLinkToDataProvider + this.datasourceId, "page_type": "dataprovider"}}); |
|
208 |
} |
|
209 |
//this.errorMessage = 'No dataProvider found'; |
|
204 | 210 |
this.showLoading = false; |
205 | 211 |
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this.properties.searchLinkToDataProviders); |
206 | 212 |
} |
Also available in: Unified diff
[Trunk | Library]:
1. landingPages/: When no id is specified or id is not found (search service returns 404), redirect to /error with more specific message.
2. error/errorPage.component.ts: When the error was caused by landing pages, add more specific message - suggest to search again.