{"record":{"id":"21dae5cb1b55c818","repo":"ruvnet/RuView","slug":"user-not-found-or-inactive","errorCode":null,"errorMessage":"User not found or inactive","messagePattern":"User not found or inactive","errorType":"exception","errorClass":"AuthenticationError","httpStatus":401,"severity":"error","filePath":"archive/v1/src/middleware/auth.py","lineNumber":363,"sourceCode":"                \"user\": {\n                    \"username\": user[\"username\"],\n                    \"email\": user[\"email\"],\n                    \"roles\": user[\"roles\"],\n                }\n            }\n            \n        except ValueError as e:\n            raise AuthenticationError(str(e))\n    \n    async def refresh_token(self, token: str) -> Dict[str, Any]:\n        \"\"\"Refresh an access token.\"\"\"\n        try:\n            payload = self.token_manager.verify_token(token)\n            username = payload.get(\"sub\")\n            \n            user = self.user_manager.get_user(username)\n            if not user or not user.get(\"is_active\", False):\n                raise AuthenticationError(\"User not found or inactive\")\n            \n            # Create new token\n            token_data = {\n                \"sub\": user[\"username\"],\n                \"email\": user[\"email\"],\n                \"roles\": user[\"roles\"],\n            }\n            \n            new_token = self.token_manager.create_access_token(token_data)\n            \n            return {\n                \"access_token\": new_token,\n                \"token_type\": \"bearer\",\n                \"expires_in\": self.settings.jwt_expire_hours * 3600,\n            }\n            \n        except Exception as e:\n            raise AuthenticationError(\"Token refresh failed\")","sourceCodeStart":345,"sourceCodeEnd":381,"githubUrl":"https://github.com/ruvnet/RuView/blob/4685618388a5e49fad5b3005806f3bdd6a7c25c3/archive/v1/src/middleware/auth.py#L345-L381","documentation":"Error \"User not found or inactive\" thrown in ruvnet/RuView.","triggerScenarios":"Thrown at archive/v1/src/middleware/auth.py:363 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4685618388a5e49fad5b3005806f3bdd6a7c25c3","analyzedAt":"2026-08-16T06:09:40.886Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}