{"record":{"id":"20b8bad0e1456608","repo":"apache/dolphinscheduler","slug":"delete-request-execute-failed-url-s","errorCode":null,"errorMessage":"Delete request execute failed, url: %s","messagePattern":"Delete request execute failed, url: (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/OkHttpUtils.java","lineNumber":149,"sourceCode":"     * @param connectTimeout connect timeout in milliseconds\n     * @param writeTimeout write timeout in milliseconds\n     * @param readTimeout read timeout in milliseconds\n     * @return OkHttpResponse\n     * @throws RuntimeException\n     */\n    public static @NonNull OkHttpResponse delete(@NonNull String url,\n                                                 @Nullable OkHttpRequestHeaders okHttpRequestHeaders,\n                                                 int connectTimeout,\n                                                 int writeTimeout,\n                                                 int readTimeout) throws IOException {\n        OkHttpClient client = getHttpClient(connectTimeout, writeTimeout, readTimeout);\n        Request.Builder requestBuilder = new Request.Builder().url(url);\n        addHeader(okHttpRequestHeaders.getHeaders(), requestBuilder);\n        requestBuilder = requestBuilder.delete();\n        try (Response response = client.newCall(requestBuilder.build()).execute()) {\n            return new OkHttpResponse(response.code(), getResponseBody(response));\n        } catch (Exception e) {\n            throw new RuntimeException(String.format(\"Delete request execute failed, url: %s\", url), e);\n        }\n    }\n\n    private static String addUrlParams(@Nullable Map<String, Object> requestParams, @NonNull String url) {\n        if (requestParams == null) {\n            return url;\n        }\n\n        HttpUrl httpUrl = HttpUrl.parse(url);\n        if (httpUrl == null) {\n            throw new IllegalArgumentException(String.format(\"url: %s is invalid\", url));\n        }\n        HttpUrl.Builder urlBuilder = httpUrl.newBuilder();\n        for (Map.Entry<String, Object> entry : requestParams.entrySet()) {\n            urlBuilder.addQueryParameter(entry.getKey(), entry.getValue().toString());\n        }\n        return urlBuilder.toString();\n    }","sourceCodeStart":131,"sourceCodeEnd":167,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/OkHttpUtils.java#L131-L167","documentation":"OkHttpUtils.delete() wraps any failure while executing an OkHttp DELETE call into a RuntimeException including the URL, with the underlying exception as cause. This is a transport-level failure: the request did not complete (connection, timeout, IO, or response-read error), not an HTTP error status.","triggerScenarios":"Calling OkHttpUtils.delete(...) when the endpoint is unreachable, the connection is reset, connect/read timeouts fire, or reading the response throws, inside client.newCall(requestBuilder.build()).execute().","commonSituations":"Deleting a resource on a service that has gone down mid-session; wrong host/port in URL; proxy intercepting DELETE; long-running delete exceeding timeouts; stale DNS in container environments.","solutions":["Test the DELETE endpoint directly with curl from the same machine.","Inspect the cause exception to identify connect vs read vs TLS failure.","Raise the connectTimeout passed to delete(...) if the server is slow to respond.","Fix DNS/service address or restart the target service."],"exampleFix":"// before\nOkHttpUtils.delete(url, headers, timeout);\n// after\ntry {\n    OkHttpResponse resp = OkHttpUtils.delete(url, headers, timeout);\n} catch (RuntimeException e) {\n    log.warn(\"DELETE {} failed: {}\", url, e.getCause());\n}","handlingStrategy":"try-catch","validationCode":"HttpUrl parsed = HttpUrl.parse(url);\nif (parsed == null) throw new IllegalArgumentException(\"Bad DELETE url: \" + url);","typeGuard":null,"tryCatchPattern":"try {\n    OkHttpResponse r = OkHttpUtils.delete(url, headers, timeout);\n} catch (RuntimeException e) {\n    log.warn(\"DELETE {} failed: {}\", url, e.getCause());\n}","preventionTips":["Verify the target service is up before issuing deletes.","Give deletes generous timeouts; some deletes are slow server-side.","Treat delete failures as retryable after checking cause type."],"tags":["http","network","okhttp","delete-request"],"backgroundTag":"http-request-failed","analyzedSha":"02eac45a1b6676e639fcbfb4be2243de5771b05d","analyzedAt":"2026-09-06T17:43:00.555Z","contentChangedAt":"2026-09-06T17:43:00.555Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}