move sentry 404 middleware to the bottom because the original location
has "if" statement