Revision 57494
Added by Konstantina Galouni over 4 years ago
project.component.ts | ||
---|---|---|
148 | 148 |
} else { |
149 | 149 |
|
150 | 150 |
this.showLoading = false; |
151 |
this.warningMessage = "No valid project id"; |
|
151 |
this._router.navigate(['/error'], {queryParams: {"page": this.properties.searchLinkToProject + this.projectId, "page_type": "project"}}); |
|
152 |
//this.warningMessage = "No valid project id"; |
|
152 | 153 |
} |
153 | 154 |
|
154 | 155 |
this.downloadURLAPI = this.properties.csvAPIURL; |
... | ... | |
329 | 330 |
err => { |
330 | 331 |
//console.log(err); |
331 | 332 |
this.handleError("Error getting project for id: " + this.projectId, err); |
333 |
if(err.status == 404) { |
|
334 |
this._router.navigate(['/error'], {queryParams: {"page": this.properties.searchLinkToProject + this.projectId, "page_type": "project"}}); |
|
335 |
} |
|
332 | 336 |
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this.properties.searchLinkToProjects); |
333 |
this.errorMessage = 'No project found'; |
|
337 |
//this.errorMessage = 'No project found';
|
|
334 | 338 |
this.showLoading = false; |
335 | 339 |
} |
336 | 340 |
); |
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.