404 middleware for Sentry.