Skip to content

Commit

Permalink
catch error in setup.status
Browse files Browse the repository at this point in the history
  • Loading branch information
MattDHill committed Jan 28, 2025
1 parent 4f28ed6 commit e9c4d57
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions web/projects/setup-wizard/src/app/pages/loading/loading.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,18 @@ export class LoadingPage {
guid: string
progress: T.FullProgress
} | void> {
const res = await this.api.getStatus()
try {
const res = await this.api.getStatus()

if (!res) {
this.navCtrl.navigateRoot('/home')
} else if (res.status === 'complete') {
this.navCtrl.navigateForward(`/success`)
} else {
return res
if (!res) {
this.navCtrl.navigateRoot('/home')
} else if (res.status === 'complete') {
this.navCtrl.navigateForward(`/success`)
} else {
return res
}
} catch (e: any) {
this.errorService.handleError(e)
}
}

Expand Down

0 comments on commit e9c4d57

Please sign in to comment.