Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Framasoft
PeerTube
PeerTube
Commits
ca0f0307
Verified
Commit
ca0f0307
authored
Aug 03, 2022
by
Chocobozzz
Browse files
Add error info on router error
parent
94278907
Changes
1
Hide whitespace changes
Inline
Side-by-side
client/src/app/core/routing/redirect.service.ts
View file @
ca0f0307
...
...
@@ -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
})
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment