Skip to content

Commit

Permalink
Merge pull request #321 from laughing0li/master
Browse files Browse the repository at this point in the history
AUS-4060 Cannot download data from some AusPASS stations
  • Loading branch information
jia020 authored Dec 15, 2023
2 parents 6b98367 + ac0effb commit cb5f61e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/app/menupanel/common/downloadpanel/downloadpanel.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { isNumber } from '@turf/helpers';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { BoundsService } from 'app/services/bounds/bounds.service';
import { NVCLService } from '../../../modalwindow/querier/customanalytic/nvcl/nvcl.service';
import { shareReplay } from 'rxjs/operators';
import { Subject } from 'rxjs';
import { catchError, shareReplay } from 'rxjs/operators';
import { Subject, throwError } from 'rxjs';

declare var gtag: Function;

Expand Down Expand Up @@ -467,7 +467,14 @@ 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);
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);
})
);
}
// Standard WFS feature download as a CSV
} else {
Expand Down

0 comments on commit cb5f61e

Please sign in to comment.