When user navigates to a URL, which is not matched to any route, Angular router throws an error
Cannot match any routes. URL Segment: [...]
What is the correct way of handling this specific error?
When using custom ErrorHandler as specified in the ExtraOptions, this error comes as a generic Error instance, so only way to match is regexp the err.message
, but that doesn't sound right.