!1430 fix(BaseAIService):发送请求方法中try/catch块捕获的应该是Exception而不是自定义的AIException

Merge pull request !1430 from 绯雾sama/v5-dev
This commit is contained in:
Looly
2025-12-27 03:55:16 +00:00
committed by Gitee

View File

@@ -66,7 +66,7 @@ public class BaseAIService {
httpRequest.setProxy(config.getProxy());
}
return httpRequest.execute();
} catch (final AIException e) {
} catch (final Exception e) {
throw new AIException("Failed to send GET request: " + e.getMessage(), e);
}
}
@@ -90,7 +90,7 @@ public class BaseAIService {
httpRequest.setProxy(config.getProxy());
}
return httpRequest.execute();
} catch (final AIException e) {
} catch (final Exception e) {
throw new AIException("Failed to send POST request" + e.getMessage(), e);
}
@@ -116,7 +116,7 @@ public class BaseAIService {
httpRequest.setProxy(config.getProxy());
}
return httpRequest.execute();
} catch (final AIException e) {
} catch (final Exception e) {
throw new AIException("Failed to send POST request" + e.getMessage(), e);
}
}