diff --git a/gateway/gateway-web/src/main/java/com/springboot/cloud/gateway/exception/GateWayExceptionHandlerAdvice.java b/gateway/gateway-web/src/main/java/com/springboot/cloud/gateway/exception/GateWayExceptionHandlerAdvice.java index 6b629b987027a5e42d55f54f20bc4f6b66b3f224..21a2c2287b461e593ba58e4d3470a7bd3102829f 100644 --- a/gateway/gateway-web/src/main/java/com/springboot/cloud/gateway/exception/GateWayExceptionHandlerAdvice.java +++ b/gateway/gateway-web/src/main/java/com/springboot/cloud/gateway/exception/GateWayExceptionHandlerAdvice.java @@ -1,7 +1,7 @@ package com.springboot.cloud.gateway.exception; import com.springboot.cloud.common.core.entity.vo.Result; -import com.springboot.cloud.common.core.exception.ErrorType; +import com.springboot.cloud.common.core.exception.SystemErrorType; import io.netty.channel.ConnectTimeoutException; import lombok.extern.slf4j.Slf4j; import org.springframework.cloud.gateway.support.NotFoundException; @@ -18,20 +18,20 @@ public class GateWayExceptionHandlerAdvice { @ExceptionHandler(value = {ResponseStatusException.class}) public Result handle(ResponseStatusException ex) { log.error("response status exception:{}", ex.getMessage()); - return Result.fail(ErrorType.GATEWAY_ERROR); + return Result.fail(SystemErrorType.GATEWAY_ERROR); } @ExceptionHandler(value = {ConnectTimeoutException.class}) public Result handle(ConnectTimeoutException ex) { log.error("connect timeout exception:{}", ex.getMessage()); - return Result.fail(ErrorType.GATEWAY_CONNECT_TIME_OUT); + return Result.fail(SystemErrorType.GATEWAY_CONNECT_TIME_OUT); } @ExceptionHandler(value = {NotFoundException.class}) @ResponseStatus(HttpStatus.NOT_FOUND) public Result handle(NotFoundException ex) { log.error("not found exception:{}", ex.getMessage()); - return Result.fail(ErrorType.GATEWAY_NOT_FOUND_SERVICE); + return Result.fail(SystemErrorType.GATEWAY_NOT_FOUND_SERVICE); } @ExceptionHandler(value = {RuntimeException.class})