{"record":{"id":"7d74d8ca43c970e1","repo":"pinpoint-apm/pinpoint","slug":"agent-status-not-found","errorCode":null,"errorMessage":"agent status not found","messagePattern":"agent status not found","errorType":"http","errorClass":"ResponseStatusException","httpStatus":404,"severity":"info","filePath":"web/src/main/java/com/navercorp/pinpoint/web/authorization/controller/AgentInfoController.java","lineNumber":106,"sourceCode":"    public DetailedAgentAndStatus getDetailedAgentInfo(\n            @ServiceParam ServiceName serviceName,\n            @RequestParam(\"agentId\") @NotBlank String agentId,\n            @RequestParam(\"timestamp\") Timestamp timestamp) {\n        DetailedAgentAndStatus result = this.agentInfoService.findDetailedAgentInfoAndStatus(agentId, timestamp.getEpochMillis());\n        if (result == null) {\n            throw new ResponseStatusException(HttpStatus.NOT_FOUND, \"detailed agent info not found\");\n        }\n        return result;\n    }\n\n    @GetMapping(value = \"/getAgentStatus\")\n    public AgentStatus getAgentStatus(\n            @ServiceParam ServiceName serviceName,\n            @RequestParam(\"agentId\") @NotBlank String agentId,\n            @RequestParam(\"timestamp\") Timestamp timestamp) {\n        AgentStatus result = this.agentInfoService.findAgentStatus(agentId, timestamp.getEpochMillis());\n        if (result == null) {\n            throw new ResponseStatusException(HttpStatus.NOT_FOUND, \"agent status not found\");\n        }\n        return result;\n    }\n\n    @GetMapping(value = \"/getAgentEvent\")\n    public AgentEvent getAgentEvent(\n            @ServiceParam ServiceName serviceName,\n            @RequestParam(\"agentId\") @NotBlank String agentId,\n            @RequestParam(\"eventTimestamp\") Timestamp eventTimestamp,\n            @RequestParam(\"eventTypeCode\") int eventTypeCode\n    ) {\n        final AgentEventType eventType = AgentEventType.getTypeByCode(eventTypeCode);\n        if (eventType == null) {\n            throw new IllegalArgumentException(\"invalid eventTypeCode [\" + eventTypeCode + \"]\");\n        }\n\n        AgentEvent result = this.agentEventService.getAgentEvent(agentId, eventTimestamp.getEpochMillis(), eventType);\n        if (result == null) {","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/web/src/main/java/com/navercorp/pinpoint/web/authorization/controller/AgentInfoController.java#L88-L124","documentation":"HTTP 404 guard in AgentInfoController.getAgentStatus: when agentInfoService cannot find a status record for the given agentId at the requested timestamp, the controller translates the null result into a ResponseStatusException with NOT_FOUND. It fires for unknown agent ids, agents outside the data retention window, or timestamps with no status snapshot. The input at fault is the agentId/timestamp query pair; callers should verify the agent existed and was active at that time.","triggerScenarios":"GET /getAgentStatus?agentId=X&timestamp=Y where no lifecycle/status record exists for that agent at that epoch millis.","commonSituations":"Timestamp before the agent registered or after its data was purged; agentId misspelled; status data missing despite agentInfo existing (incomplete lifecycle records).","solutions":["Query a timestamp during the agent's known active window","Verify the agentId","If agent info exists but status never does, check agent lifecycle event data in HBase"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"if (timestamp == null || timestamp.getEpochMillis() <= 0) throw new IllegalArgumentException(\"valid timestamp required\");","typeGuard":null,"tryCatchPattern":"try { return api.getAgentStatus(id, ts); } catch (ResponseStatusException e) { if (e.getStatus() == HttpStatus.NOT_FOUND) return AgentStatus.UNKNOWN; throw e; }","preventionTips":["Query timestamps within the agent's recorded lifetime","Remember status data may be absent even when basic agentInfo exists","Treat 404 as 'no status at that time', not necessarily a bug"],"tags":["http-404","rest-api","agent-status","not-found"],"backgroundTag":"resource-not-found","analyzedSha":"744c3d3075e595656abb1ae331ad2c0e4c9eb996","analyzedAt":"2026-09-07T18:48:45.289Z","contentChangedAt":"2026-09-07T18:48:45.289Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}