Skip to content

Commit

Permalink
fix: edge调用center feign请求超时后,edge本地逻辑需要继续执行 #2749
Browse files Browse the repository at this point in the history
  • Loading branch information
yaoxuwan committed Nov 18, 2024
1 parent 1b264d0 commit 341b3c4
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import com.tencent.bkrepo.common.service.cluster.properties.ClusterProperties
import com.tencent.bkrepo.common.service.exception.RemoteErrorCodeException
import com.tencent.bkrepo.common.service.util.HeaderUtils
import com.tencent.bkrepo.common.service.util.SpringContextUtils
import feign.RetryableException
import org.slf4j.LoggerFactory
import org.springframework.util.AntPathMatcher

Expand Down Expand Up @@ -154,6 +155,11 @@ object ClusterUtils {
if (!messageCodes.map { it.getCode() }.contains(e.errorCode)) {
throw e
}
} catch (e: RetryableException) {
if (e.message?.contains("Read time out") == true) {
logger.info("ignore feign exception: ${e.message}")
}
throw e
}
}
}

0 comments on commit 341b3c4

Please sign in to comment.