{"record":{"id":"1198d48a12196bdb","repo":"pinpoint-apm/pinpoint","slug":"no-service-type-provided","errorCode":null,"errorMessage":"No service type provided.","messagePattern":"No service type provided\\.","errorType":"http","errorClass":"ResponseStatusException","httpStatus":400,"severity":"warning","filePath":"web/src/main/java/com/navercorp/pinpoint/web/authorization/controller/AdminController.java","lineNumber":187,"sourceCode":"    @RequestMapping(value = \"/getInactiveAgents\")\n    public Map<String, List<Application>> getInactiveAgents(\n            @RequestParam(value = \"applicationName\") @NotBlank String applicationName,\n            @RequestParam(value = \"durationDays\", defaultValue = AdminService.MIN_DURATION_DAYS_FOR_INACTIVITY_STR)\n            @Min(AdminService.MIN_DURATION_DAYS_FOR_INACTIVITY)\n            int durationDays\n    ) {\n        logger.info(\"Getting in-active agents - applicationName: [{}], duration: {} days.\",\n                applicationName, durationDays);\n        return this.adminService.getInactiveAgents(applicationName, durationDays);\n    }\n\n    private Application getApplication(Service service, String applicationName, Integer serviceTypeCode, String serviceTypeName) {\n        if (serviceTypeCode != null) {\n            return applicationFactory.createApplication(service, applicationName, serviceTypeCode);\n        } else if (serviceTypeName != null) {\n            return applicationFactory.createApplicationByTypeName(service, applicationName, serviceTypeName);\n        }\n        throw new ResponseStatusException(HttpStatus.BAD_REQUEST, \"No service type provided.\");\n    }\n}\n","sourceCodeStart":169,"sourceCodeEnd":190,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/web/src/main/java/com/navercorp/pinpoint/web/authorization/controller/AdminController.java#L169-L190","documentation":"AdminController.getApplication requires a service type when constructing an Application object for a REST call. If neither serviceTypeCode nor serviceTypeName request parameters are supplied, it throws HTTP 400 'No service type provided.'","triggerScenarios":"Calling admin/application-related endpoints that pass applicationName but omit both serviceTypeCode and serviceTypeName query parameters.","commonSituations":"Older clients or curl scripts written before multi-service (Service) support was added; missing parameter after API refactor; copy-pasted request templates missing the serviceType argument.","solutions":["Add serviceTypeCode=<int> to the request","Or add serviceTypeName=<string> (e.g. HTTP_CLIENT) to the request","Update client scripts/docs to the current API parameter contract"],"exampleFix":"// before\nGET /admin/application?applicationName=myApp\n// after\nGET /admin/application?applicationName=myApp&serviceTypeCode=1010","handlingStrategy":"validation","validationCode":"if (serviceTypeCode == null && serviceTypeName == null) throw new IllegalArgumentException(\"Either serviceTypeCode or serviceTypeName is required\");","typeGuard":"boolean hasServiceType(Integer code, String name) { return code != null || (name != null && !name.isBlank()); }","tryCatchPattern":null,"preventionTips":["Always pass serviceTypeCode (or serviceTypeName) in admin application queries","Keep client request templates in sync with the current controller signature","Document required parameters in API client wrappers"],"tags":["http-400","rest-api","validation","missing-parameter"],"backgroundTag":"missing-required-argument","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"}