diff options
author | Chocobozzz <me@florianbigard.com> | 2022-08-03 15:21:00 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-08-03 15:21:00 +0200 |
commit | ca0f030787a6334609aa1b0c7cea44676adf3632 (patch) | |
tree | 646b3a2147f82b3b2b285442e8a0a49738893d16 /client | |
parent | 9427890798c0e9b87cf13d39c50bc637f7989c7e (diff) | |
download | PeerTube-ca0f030787a6334609aa1b0c7cea44676adf3632.tar.gz PeerTube-ca0f030787a6334609aa1b0c7cea44676adf3632.tar.zst PeerTube-ca0f030787a6334609aa1b0c7cea44676adf3632.zip |
Add error info on router error
Diffstat (limited to 'client')
-rw-r--r-- | client/src/app/core/routing/redirect.service.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/client/src/app/core/routing/redirect.service.ts b/client/src/app/core/routing/redirect.service.ts index 575b3b2a1..1344458d5 100644 --- a/client/src/app/core/routing/redirect.service.ts +++ b/client/src/app/core/routing/redirect.service.ts | |||
@@ -89,10 +89,10 @@ export class RedirectService { | |||
89 | 89 | ||
90 | this.router.navigateByUrl(this.defaultRoute, { skipLocationChange }) | 90 | this.router.navigateByUrl(this.defaultRoute, { skipLocationChange }) |
91 | .then(() => this.redirectingToHomepage = false) | 91 | .then(() => this.redirectingToHomepage = false) |
92 | .catch(() => { | 92 | .catch(err => { |
93 | this.redirectingToHomepage = false | 93 | this.redirectingToHomepage = false |
94 | 94 | ||
95 | logger.error(`Cannot navigate to ${this.defaultRoute}, resetting default route to ${RedirectService.INIT_DEFAULT_ROUTE}`) | 95 | logger.error(`Cannot navigate to ${this.defaultRoute}, resetting default route to ${RedirectService.INIT_DEFAULT_ROUTE}`, err) |
96 | 96 | ||
97 | this.defaultRoute = RedirectService.INIT_DEFAULT_ROUTE | 97 | this.defaultRoute = RedirectService.INIT_DEFAULT_ROUTE |
98 | return this.router.navigateByUrl(this.defaultRoute, { skipLocationChange }) | 98 | return this.router.navigateByUrl(this.defaultRoute, { skipLocationChange }) |