fix(region): show pretty error (#24021)

This commit is contained in:
屈轩
2026-01-06 10:29:39 +08:00
committed by GitHub
parent 27500ca14e
commit c1cd91e01c
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -103,7 +103,7 @@ func (this *BaseManager) jsonRequest(session *mcclient.ClientSession,
method, this.versionedURL(path),
header, body)
if err != nil {
if e, ok := err.(*httputils.JSONClientError); ok {
if e, ok := err.(*httputils.JSONClientError); ok && strings.Contains(e.Details, e.Request.Url) {
switch e.Class {
case errors.ErrConnectRefused.Error():
return nil, nil, httperrors.NewServiceAbnormalError("%s service is abnormal, please check service status", this.serviceType)