-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplified AusPASS errors to use status code.
Fixed console bbox error.
- Loading branch information
1 parent
0a64c3a
commit 59d033d
Showing
1 changed file
with
11 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -484,14 +484,7 @@ export class DownloadPanelComponent implements OnInit { | |
if (this.irisDownloadListOption.selectedserviceType === 'Station') { | ||
observableResponse = this.downloadIrisService.downloadIRISStation(this.layer, this.bbox, station, channel, start, end); | ||
} else { | ||
observableResponse = this.downloadIrisService.downloadIRISDataselect(this.layer, station, channel, start, end) | ||
.pipe( | ||
catchError(err => { | ||
// Handle the error or log it | ||
alert('Please narrow down the date range, as the request data is too large.') | ||
return throwError(err); | ||
}) | ||
); | ||
observableResponse = this.downloadIrisService.downloadIRISDataselect(this.layer, station, channel, start, end); | ||
} | ||
// Standard WFS feature download as a CSV | ||
} else { | ||
|
@@ -508,17 +501,24 @@ export class DownloadPanelComponent implements OnInit { | |
this.downloadStarted = false; | ||
if (UtilitiesService.isEmpty(err.message)) { | ||
alert('An error has occurred whilst attempting to download. Please contact [email protected]'); | ||
} else if (err.status === 413 && this.irisDownloadListOption) { | ||
} | ||
|
||
else if (err.status === 413 && this.irisDownloadListOption) { | ||
alert('An error has occurred whilst attempting to download. (Request entity is too large, please reduce the size by limiting the stations, channels, or time period.) Please contact [email protected]'); | ||
} else { | ||
alert('There is an error, when downloading (' + this.layer.name + ') layer at location (' + | ||
let alertMessage = 'There is an error, when downloading (' + this.layer.name + ') layer'; | ||
if (this.bbox) { | ||
alertMessage += ' at location (' + | ||
'eLongitude:' + Math.floor(this.bbox.eastBoundLongitude) | ||
+ ' nLatitude: ' + Math.floor(this.bbox.northBoundLatitude) | ||
+ ' sLatitude:' + Math.floor(this.bbox.southBoundLatitude) | ||
+ ' wLongitude:' + Math.floor(this.bbox.westBoundLongitude) | ||
+ '). Detail of the error: (' + err.message + ')'); | ||
+ '). Detail of the error: (' + err.message + ')'; | ||
} | ||
alert(alertMessage); | ||
} | ||
}); | ||
|
||
} | ||
|
||
/** | ||
|