I like the approach of handling these sorts of error cases in middleware. Is it trustworthy enough to do away with the `!badge` check?