{"record":{"id":"5547893912de9006","repo":"apache/dolphinscheduler","slug":"http-request-method-s-not-supported","errorCode":null,"errorMessage":"http request method %s not supported","messagePattern":"http request method (.+?) not supported","errorType":"exception","errorClass":"RuntimeException","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":142,"sourceCode":"        }\n    }\n\n    private OkHttpResponse sendHttpRequest(String msg) throws RuntimeException {\n        switch (requestType) {\n            case POST:\n                setMsgInHeader(msg);\n                setMsgInRequestBody(msg);\n                return sendPostRequest();\n            case GET:\n                setMsgInUrl(msg);\n                setMsgInHeader(msg);\n                return sendGetRequest();\n            case PUT:\n                setMsgInHeader(msg);\n                setMsgInRequestBody(msg);\n                return sendPutRequest();\n            default:\n                throw new RuntimeException(String.format(\"http request method %s not supported\",\n                        requestType));\n        }\n    }\n\n    @SneakyThrows\n    private OkHttpResponse sendGetRequest() {\n        OkHttpRequestHeaders okHttpRequestHeaders = new OkHttpRequestHeaders();\n        okHttpRequestHeaders.setHeaders(headerParams);\n        okHttpRequestHeaders.setOkHttpRequestHeaderContentType(contentType);\n        Map<String, Object> requestParams = new HashMap<>();\n        log.info(\"sending http alert get request, url: {}, header: {}, requestParams: {}, contentType: {}\",\n                url, headerParams, requestParams, contentType.getValue());\n        return OkHttpUtils.get(url, okHttpRequestHeaders,\n                requestParams, timeout, timeout, timeout);\n    }\n\n    @SneakyThrows\n    private OkHttpResponse sendPostRequest() {","sourceCodeStart":124,"sourceCodeEnd":160,"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#L124-L160","documentation":"HttpSender.sendHttpRequest builds an OkHttpClient request based on the alert's configured HTTP method. Only GET, POST, PUT (and HEAD via its branch) are handled; any other method configured on the HTTP alert plugin falls through to the default branch and throws this RuntimeException. It is a configuration-level guard, not a transport failure.","triggerScenarios":"An HTTP alert plugin instance whose 'requestType' parameter is set to a method other than GET/POST/PUT/HEAD (e.g. DELETE or a typo like 'get ' / 'PATCH') when an alert fires and send() calls sendHttpRequest().","commonSituations":"Typo in the requestType field when creating the HTTP alert in the UI; version drift where an alert configured for a method the installed plugin version does not support; automated provisioning writing an uppercase/lowercase mismatched method.","solutions":["Edit the HTTP alert instance configuration and set requestType to one of GET, POST, PUT or HEAD.","If DELETE is required, upgrade to a DolphinScheduler version whose HttpSender supports it, or implement a custom alert plugin.","Check for whitespace/case issues in the stored requestType value and normalize it (trim + toUpperCase) before creating the alert."],"exampleFix":"// before: alert instance params\n{\"requestType\": \"DELETE\"}\n// after\n{\"requestType\": \"POST\"}","handlingStrategy":"validation","validationCode":"Set<String> SUPPORTED = Set.of(\"GET\", \"POST\", \"PUT\", \"HEAD\");\nif (!SUPPORTED.contains(requestType.trim().toUpperCase())) {\n    throw new IllegalArgumentException(\"requestType must be one of GET/POST/PUT/HEAD: \" + requestType);\n}","typeGuard":null,"tryCatchPattern":"try {\n    alertSender.send(alert);\n} catch (RuntimeException e) {\n    if (e.getMessage().contains(\"http request method\")) {\n        log.error(\"Fix HTTP alert instance requestType: {}\", e.getMessage());\n    }\n}","preventionTips":["Restrict requestType in any alert-creation UI/script to GET/POST/PUT/HEAD.","Normalize (trim+uppercase) requestType when persisting alert instance params.","Add a smoke alert test after creating/updating HTTP alert instances."],"tags":["alert-plugin","http","invalid-config-value","unsupported-method"],"backgroundTag":"unsupported-operation","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"}