Q:

Angular NgxSpinnerService could not hide

I am struggling with a angular NgxSpinnerSerice problem: I cannot ALWAYS hide the spinner after getting response. 
The thing I did is simple: show the spinner, send the request and get the result, then hide the spinner. With my code, if the response returned with results, the spinner hides. But if it find nothing, the spinner won't disappear.
The code is as below:
  async searchGenotype() {
    this.spinner.show();
    await this.service.getList();
    this.spinner.hide();
  }

The service.getList function is as below
 getList() {
      let promise = new Promise((resolve, reject) => {
        this.search(this.formData, this.familySearch)
            .toPromise()
            .then(
              res => {
                this.genotypeQueryList = res as GenotypeQueryResult[];
                resolve();
              },
              msg => {
                this.genotypeQueryList = []
                reject(msg);
              }
            )
      })
      return promise;
  }

Did I miss something there? Thanks

A:

I think you have to handle the reject by the second part:
  searchGenotype() {
    this.spinner.show();
    this.service.getList().then( () => {
      this.spinner.hide();
    }, (error) => {
      // Here follows the whole error handling...
      this.spinner.hide();
    })
  }

