| | |
| | | updateAfterNotify(row, mergedBody, res, nextRetry, now, row.getMaxRetryCount()); |
| | | } |
| | | } catch (FeignException e) { |
| | | String responseBody = e.contentUTF8(); |
| | | String fullMsg = "status=" + e.status() + ",message=" + e.getMessage() |
| | | + (responseBody == null || responseBody.isEmpty() ? "" : ",responseBody=" + responseBody); |
| | | log.warn("云仓上报同批合并请求失败:{}", fullMsg); |
| | | String err = feignErrorSummary(e); |
| | | log.warn("云仓上报同批合并请求失败:{}", err); |
| | | for (CloudWmsNotifyLog row : group) { |
| | | int nextRetry = (row.getRetryCount() == null ? 0 : row.getRetryCount()) + 1; |
| | | setFailResult(row, mergedBody, "请求异常: " + fullMsg, nextRetry, now, row.getMaxRetryCount()); |
| | | setFailResult(row, mergedBody, "请求异常: " + err, nextRetry, now, row.getMaxRetryCount()); |
| | | } |
| | | } catch (Exception e) { |
| | | log.warn("云仓上报同批合并请求失败:{}", e.getMessage()); |
| | |
| | | setFailResult(row, mergedBody, "请求异常: " + e.getMessage(), nextRetry, now, row.getMaxRetryCount()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** 打印全部返回日志 */ |
| | | private static String feignErrorSummary(FeignException e) { |
| | | String body = e.contentUTF8(); |
| | | if (body != null && !body.trim().isEmpty()) { |
| | | return "status=" + e.status() + ",responseBody=" + body.trim(); |
| | | } |
| | | return "status=" + e.status() + ",message=" + e.getMessage(); |
| | | } |
| | | |
| | | private static List<Long> idsOf(List<CloudWmsNotifyLog> group) { |
| | |
| | | log.warn("云仓上报请求体反序列化失败,id={}:{}", logRecord.getId(), e.getMessage()); |
| | | setFailResult(logRecord, requestBody, "反序列化失败: " + e.getMessage(), nextRetry, now, effectiveMaxRetry); |
| | | } catch (FeignException e) { |
| | | String responseBody = e.contentUTF8(); |
| | | String fullMsg = "status=" + e.status() + ",message=" + e.getMessage() |
| | | + (responseBody == null || responseBody.isEmpty() ? "" : ",responseBody=" + responseBody); |
| | | log.warn("云仓上报请求失败,id={},bizRef={}:{}", logRecord.getId(), logRecord.getBizRef(), fullMsg); |
| | | setFailResult(logRecord, requestBody, "请求异常: " + fullMsg, nextRetry, now, effectiveMaxRetry); |
| | | String err = feignErrorSummary(e); |
| | | log.warn("云仓上报请求失败,id={},bizRef={}:{}", logRecord.getId(), logRecord.getBizRef(), err); |
| | | setFailResult(logRecord, requestBody, "请求异常: " + err, nextRetry, now, effectiveMaxRetry); |
| | | } catch (Exception e) { |
| | | log.warn("云仓上报请求失败,id={},bizRef={}:{}", logRecord.getId(), logRecord.getBizRef(), e.getMessage()); |
| | | setFailResult(logRecord, requestBody, "请求异常: " + e.getMessage(), nextRetry, now, effectiveMaxRetry); |