det101 commented on PR #18688: URL: https://github.com/apache/dolphinscheduler/pull/18688#issuecomment-6092636590
`OkHttpUtils.getResponseBody()` is shared by the HTTP task, the HTTP alert sender, and OAuth login. After this change, a non-200 response returns the real body instead of the synthetic `Request execute failed...` string. HTTP task `BODY_CONTAINS` / `BODY_NOT_CONTAINS` do not look at the status code. Previously a 4xx/5xx body was that synthetic string, so a contains-check almost never matched. Now a 500 whose body contains the configured keyword is treated as success. The 202 test shows this is intended for accepted responses; please mention the 4xx/5xx behavior in the PR description so users are not surprised. The `body == null` branch still returns `Request execute failed, httpBody: null`. `Call.execute()` usually has a non-null body, but if it is null, returning an empty string would avoid labeling a successful empty response as a failed request. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
