]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Add error info on router error
authorChocobozzz <me@florianbigard.com>
Wed, 3 Aug 2022 13:21:00 +0000 (15:21 +0200)
committerChocobozzz <me@florianbigard.com>
Wed, 3 Aug 2022 13:21:00 +0000 (15:21 +0200)
client/src/app/core/routing/redirect.service.ts

index 575b3b2a18322c9da5d10d3ec9a71a91cad410c7..1344458d556c00d7ca0200d9ab5cadb2d1b98509 100644 (file)
@@ -89,10 +89,10 @@ export class RedirectService {
 
     this.router.navigateByUrl(this.defaultRoute, { skipLocationChange })
         .then(() => this.redirectingToHomepage = false)
-        .catch(() => {
+        .catch(err => {
           this.redirectingToHomepage = false
 
-          logger.error(`Cannot navigate to ${this.defaultRoute}, resetting default route to ${RedirectService.INIT_DEFAULT_ROUTE}`)
+          logger.error(`Cannot navigate to ${this.defaultRoute}, resetting default route to ${RedirectService.INIT_DEFAULT_ROUTE}`, err)
 
           this.defaultRoute = RedirectService.INIT_DEFAULT_ROUTE
           return this.router.navigateByUrl(this.defaultRoute, { skipLocationChange })