fix issue #4050: 处理codepay接口返回202状态码导致响应异常#4054
Conversation
|
@codex auggie review |
🤖 Augment PR SummarySummary: 修复 issue #4050:codepay 接口返回 202(Accepted)时被当作异常处理的问题。 🤖 Was this summary useful? React with 👍 or 👎 |
|
|
||
| if (HttpStatus.SC_OK == statusCode || HttpStatus.SC_NO_CONTENT == statusCode) { | ||
| if (HttpStatus.SC_OK == statusCode || HttpStatus.SC_NO_CONTENT == statusCode | ||
| || (HttpStatus.SC_ACCEPTED == statusCode && url.endsWith("/codepay"))) { |
There was a problem hiding this comment.
WxPayServiceApacheHttpImpl.java:179 这里通过 url.endsWith("/codepay") 判断 codepay,若调用方传入的 URL 末尾带 / 或携带 query 参数,条件可能不命中从而 202 仍会被当作异常处理。可以确认下 postV3WithWechatpaySerial 的 url 是否在所有调用路径上都保证规范化到不含 query/尾斜杠。
Severity: low
Other Locations
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/WxPayServiceHttpComponentsImpl.java:176
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
No description provided.