{"record":{"id":"9bcd4cec644b63e9","repo":"quarkusio/quarkus","slug":"parameter-type-should-be-provided","errorCode":null,"errorMessage":"Parameter type should be provided.","messagePattern":"Parameter type should be provided\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"extensions/smallrye-stork/runtime/src/main/java/io/quarkus/stork/StorkConfigUtil.java","lineNumber":285,"sourceCode":"\n                Enumeration<InetAddress> addresses = iface.getInetAddresses();\n                while (addresses.hasMoreElements()) {\n                    InetAddress addr = addresses.nextElement();\n                    if (!addr.isLoopbackAddress() && addr instanceof Inet4Address) {\n                        return addr;\n                    }\n                }\n            }\n        } catch (SocketException e) {\n            LOGGER.error(\"Error checking network interfaces\", e);\n        }\n\n        return null;\n    }\n\n    public static void requireRegistrarTypeNotBlank(String type) {\n        if (type == null || type.isBlank()) {\n            throw new IllegalArgumentException(\"Parameter type should be provided.\");\n        }\n    }\n\n}\n","sourceCodeStart":267,"sourceCodeEnd":290,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/smallrye-stork/runtime/src/main/java/io/quarkus/stork/StorkConfigUtil.java#L267-L290","documentation":"StorkConfigUtil.requireRegistrarTypeNotBlank is a guard used when building Stork registrar-only configuration (buildRegistrarOnlyConfiguration, addRegistrarTypeIfAbsent). It throws IllegalArgumentException when the service-registration 'type' parameter is null or blank, because a Stork registrar cannot be constructed without knowing which registry (consul, eureka, kubernetes) to talk to.","triggerScenarios":"Calling StorkConfigUtil APIs that build registrar configuration while the resolved registrar type string is null or empty — e.g. quarkus.stork.<service>.service-registration.type is unset and the caller passes it straight through, or programmatic configuration omits the type.","commonSituations":"quarkus.stork.my-service.service-registration.type left blank in application.properties; YAML config where the type key exists but has an empty value; code that computes the type from an environment variable that is not set; refactors that renamed the config key leaving the old one ignored.","solutions":["Set quarkus.stork.<service>.service-registration.type (e.g. consul, eureka, kubernetes) in application.properties.","If building configuration programmatically, pass a non-blank type string to StorkConfigUtil.","Wrap the call with an explicit blank check and a helpful error message pointing at the offending service config."],"exampleFix":"// before\nString type = config.getValue(\"quarkus.stork.\" + service + \".service-registration.type\");\nStorkConfigUtil.requireRegistrarTypeNotBlank(type);\n\n// after\nString type = config.getValue(\"quarkus.stork.\" + service + \".service-registration.type\");\nif (type == null || type.isBlank()) {\n    type = \"consul\"; // or fail fast with a service-specific message\n}\nStorkConfigUtil.requireRegistrarTypeNotBlank(type);","handlingStrategy":"validation","validationCode":"if (type == null || type.isBlank()) {\n    throw new IllegalStateException(\"quarkus.stork.<svc>.service-registration.type must be set before building registrar config\");\n}\nStorkConfigUtil.requireRegistrarTypeNotBlank(type);","typeGuard":null,"tryCatchPattern":"try {\n    StorkConfigUtil.requireRegistrarTypeNotBlank(type);\n} catch (IllegalArgumentException e) {\n    LOG.error(\"Missing stork registrar type; check quarkus.stork.*.service-registration.type\", e);\n}","preventionTips":["Always set service-registration.type for every stork service entry","Validate application.properties in CI with a config linter/quarkus config check"],"tags":["quarkus","stork","configuration","illegal-argument"],"backgroundTag":"missing-config-property","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}