From ca0f030787a6334609aa1b0c7cea44676adf3632 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 3 Aug 2022 15:21:00 +0200 Subject: Add error info on router error --- client/src/app/core/routing/redirect.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client/src/app') 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 { 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 }) -- cgit v1.2.3