Currently, I am utilizing $stateProvider to configure my states in the following manner:
constructor($stateProvider, $urlRouterProvider, $locationProvider) {
$stateProvider.
state("something", {
url: "/index.html"
})
// many more
}
One thing worth mentioning is that I have chosen not to use
$urlRouterProvider.otherwise('default-something');
, so when entering /invalidstate
, I expected a 404 error. To my surprise, instead of a 404 response, I'm actually receiving a 200 response.
My main objective is to create a 404 interceptor, but I'm facing an obstacle as I need to trigger a 404 error first in order to intercept it properly. I'm puzzled as to why an unhandled state would yield a 200 response.