{"record":{"id":"231f2e5666fe03e9","repo":"apache/dolphinscheduler","slug":"requesttype-is-not-a-valid-value","errorCode":null,"errorMessage":"requestType is not a valid value","messagePattern":"requestType is not a valid value","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-http/src/main/java/org/apache/dolphinscheduler/plugin/alert/http/HttpSender.java","lineNumber":86,"sourceCode":"        } else {\n            headerParams = new HashMap<>();\n        }\n\n        String bodyParamsString = paramsMap.get(HttpAlertConstants.NAME_BODY_PARAMS);\n        if (StringUtils.isNotBlank(bodyParamsString)) {\n            bodyParams = JSONUtils.parseObject(bodyParamsString, new TypeReference<Map<String, Object>>() {\n            });\n            if (bodyParams == null) {\n                throw new IllegalArgumentException(\"bodyParams is not a valid json\");\n            }\n        } else {\n            bodyParams = new HashMap<>();\n        }\n\n        try {\n            requestType = HttpRequestMethod.valueOf(paramsMap.get(HttpAlertConstants.NAME_REQUEST_TYPE));\n        } catch (IllegalArgumentException e) {\n            throw new IllegalArgumentException(\"requestType is not a valid value\");\n        }\n\n        contentType = OkHttpRequestHeaderContentType.fromValue(paramsMap.get(HttpAlertConstants.NAME_CONTENT_TYPE));\n        if (contentType == null) {\n            throw new IllegalArgumentException(\"contentType is not a valid value\");\n        }\n\n        timeout = (StringUtils.isNotBlank(paramsMap.get(HttpAlertConstants.NAME_TIMEOUT))\n                ? Integer.parseInt(paramsMap.get(HttpAlertConstants.NAME_TIMEOUT))\n                : HttpAlertConstants.DEFAULT_TIMEOUT) * 1000;\n    }\n\n    AlertResult send(String msg) {\n\n        AlertResult alertResult = new AlertResult();\n        OkHttpResponse okHttpResponse;\n\n        try {","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-http/src/main/java/org/apache/dolphinscheduler/plugin/alert/http/HttpSender.java#L68-L104","documentation":"paramsValidator converts the 'requestType' parameter to the HttpRequestMethod enum via valueOf. Any name that is not an exact enum constant (GET, POST, etc.) throws an inner IllegalArgumentException which is rethrown as 'requestType is not a valid value'.","triggerScenarios":"requestType missing (null -> NullPointerException is not caught, but a wrong string like 'Get'/'PUTT' throws), or any value not matching an HttpRequestMethod constant exactly.","commonSituations":"Typo or lowercase value in the HTTP alert request type field; selecting a method unsupported by this plugin version (e.g. 'PATCH' on older builds).","solutions":["Set requestType to an exact, uppercase supported value such as GET, POST, PUT, DELETE (check HttpRequestMethod for the list in your version).","Verify the value is not null or misspelled in the alert params JSON.","Upgrade DolphinScheduler if you need an HTTP method not present in your version's enum."],"exampleFix":"// before\nrequestType=get\n// after\nrequestType=GET","handlingStrategy":"validation","validationCode":"String rt = paramsMap.get(\"requestType\");\nif (rt == null || java.util.Arrays.stream(HttpRequestMethod.values()).noneMatch(m -> m.name().equals(rt))) throw new IllegalArgumentException(\"requestType must be one of GET/POST/...\");","typeGuard":null,"tryCatchPattern":"try { new HttpAlert(paramsMap); } catch (IllegalArgumentException e) { log.error(\"invalid requestType\", e); }","preventionTips":["Use exact uppercase enum constant names","Check HttpRequestMethod enum for supported values in your version","Use the alert UI dropdown instead of hand-editing params"],"tags":["http","enum","configuration"],"backgroundTag":"invalid-enum-value","analyzedSha":"02eac45a1b6676e639fcbfb4be2243de5771b05d","analyzedAt":"2026-09-06T17:43:00.555Z","contentChangedAt":"2026-09-06T17:43:00.555Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}