Skip to content

Commit

Permalink
fix 2sic/2sxc#2647 show error message and a link to a checklist how t…
Browse files Browse the repository at this point in the history
…o manually install content-templates
  • Loading branch information
tvatavuk authored and maaaximum-at-2sic committed Jun 20, 2022
1 parent a3a6db8 commit 1dd637f
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions projects/quick-dialog/src/app/installer/installer.component.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

import { tap, switchMap, map, filter, debounceTime } from 'rxjs/operators';
import { tap, switchMap, map, filter, debounceTime, catchError } from 'rxjs/operators';
import { Component, OnInit, Input } from '@angular/core';
import { InstallerService } from 'app/installer/installer.service';
import { DomSanitizer } from '@angular/platform-browser';
import { fromEvent, Subscription } from 'rxjs';
import { fromEvent, of, Subscription } from 'rxjs';
import { GettingStartedService } from './getting-started.service';
import { Config } from '../config';

Expand Down Expand Up @@ -94,12 +94,20 @@ This takes about 10 seconds per package. Don't reload the page while it's instal
this.showProgress = false;
alert('Installation complete 👍');
window.top.location.reload();
}))
}),

.subscribe(null, () => {
catchError(error => {
console.error('Error: ', error);
this.showProgress = false;
alert('An error occurred.');
alreadyProcessing = false;
}));
var errorMsg = `An error occurred: ${error.error?.Message ?? error.error?.message ?? ''}
${error.message}
Please try again later or check how to manually install content-templates: https://azing.org/2sxc/r/0O4OymoA`;
alert(errorMsg);
return of(error);
}),
).subscribe());
}
}

0 comments on commit 1dd637f

Please sign in to comment.