Fix 404 response for invalid token IDs