|
|
@@ -21,11 +21,6 @@ public class GatewayExceptionUtil {
|
|
|
|
|
|
log.error("网关服务不可用异常: 路径={}, 方法={}, 异常信息={}", path, method, throwable.getMessage());
|
|
|
|
|
|
- // 【新增】:如果是业务异常,直接提取里面的 code 和 message 透传给前端
|
|
|
- if (throwable instanceof BusinessPlatfromException) {
|
|
|
- BusinessPlatfromException bizEx = (BusinessPlatfromException) throwable;
|
|
|
- return HttpResult.error(bizEx.getErrorCode(), bizEx.getErrorMsg());
|
|
|
- }
|
|
|
// 根据异常类型返回不同的错误信息
|
|
|
if (throwable instanceof org.springframework.cloud.gateway.support.NotFoundException) {
|
|
|
return HttpResult.error(60500, "目标服务不存在或未启动");
|