{"record":{"id":"8d8b97b22e24da92","repo":"pinpoint-apm/pinpoint","slug":"agent-info-not-found","errorCode":null,"errorMessage":"agent info not found","messagePattern":"agent info not found","errorType":"http","errorClass":"ResponseStatusException","httpStatus":404,"severity":"info","filePath":"web/src/main/java/com/navercorp/pinpoint/web/authorization/controller/AgentInfoController.java","lineNumber":82,"sourceCode":"\n    private final RangeValidator rangeValidator;\n\n    public AgentInfoController(AgentInfoService agentInfoService, AgentEventService agentEventService, ConfigProperties configProperties) {\n        this.agentInfoService = Objects.requireNonNull(agentInfoService, \"agentInfoService\");\n        this.agentEventService = Objects.requireNonNull(agentEventService, \"agentEventService\");\n        Objects.requireNonNull(configProperties, \"configProperties\");\n        this.rangeValidator = new ForwardRangeValidator(Duration.ofDays(configProperties.getInspectorPeriodMax()));\n    }\n\n    @PreAuthorize(\"@naverPermissionEvaluator.hasInspectorPermission(#serviceName.getName(), new com.navercorp.pinpoint.common.server.bo.AgentParam(#agentId, #timestamp))\")\n    @GetMapping(value = \"/getAgentInfo\")\n    public AgentAndStatus getAgentInfo(\n            @ServiceParam ServiceName serviceName,\n            @RequestParam(\"agentId\") @NotBlank String agentId,\n            @RequestParam(\"timestamp\") Timestamp timestamp) {\n        AgentAndStatus result = this.agentInfoService.findAgentInfoAndStatus(agentId, timestamp.getEpochMillis());\n        if (result == null) {\n            throw new ResponseStatusException(HttpStatus.NOT_FOUND, \"agent info not found\");\n        }\n        return result;\n    }\n\n    @GetMapping(value = \"/getDetailedAgentInfo\")\n    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(","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/web/src/main/java/com/navercorp/pinpoint/web/authorization/controller/AgentInfoController.java#L64-L100","documentation":"AgentInfoController.getAgentInfo looks up agent info plus lifecycle status for the given agentId at a timestamp. When agentInfoService.findAgentInfoAndStatus returns null, it throws HTTP 404 'agent info not found'.","triggerScenarios":"GET /getAgentInfo?agentId=X&timestamp=Y where the agentId never existed, was deleted, or has no data recorded at/around the given timestamp.","commonSituations":"Typo in agentId; querying a timestamp before the agent first started; agent data purged by TTL/cleanup jobs; querying the wrong cluster.","solutions":["Verify the agentId exists (check the agent list for the application)","Query a timestamp within the agent's actual lifetime","Use /getAgentList or the UI to confirm the agent's exact id and time range"],"exampleFix":"// before\nAgentAndStatus r = svc.findAgentInfoAndStatus(id, ts);\n// after\nAgentAndStatus r = svc.findAgentInfoAndStatus(id, ts);\nif (r == null) throw new ResponseStatusException(HttpStatus.NOT_FOUND, \"agent info not found: \" + id); // handled by caller via 404 check","handlingStrategy":"fallback","validationCode":"if (agentId == null || agentId.isBlank()) throw new IllegalArgumentException(\"agentId required\");","typeGuard":null,"tryCatchPattern":"try { return api.getAgentInfo(id, ts); } catch (ResponseStatusException e) { if (e.getStatus() == HttpStatus.NOT_FOUND) return Optional.empty(); throw e; }","preventionTips":["Confirm the agentId from the application's agent list first","Query timestamps inside the agent's known lifetime window","Handle 404 as a normal 'absent' result rather than an exception path"],"tags":["http-404","rest-api","agent-info","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"}