From 08c88e9e277bf97787bf584acbc3a60223954d2c Mon Sep 17 00:00:00 2001 From: Wenchao Gong Date: Mon, 18 Oct 2021 21:06:20 +0800 Subject: [PATCH] =?UTF-8?q?=E9=94=99=E8=AF=AF=E6=A0=BC=E5=BC=8F=E6=A0=87?= =?UTF-8?q?=E5=87=86=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/gateway/filter/CustomerGlobalFilter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruoyi-extend/ruoyi-isc-gateway/src/main/java/com/ruoyi/gateway/filter/CustomerGlobalFilter.java b/ruoyi-extend/ruoyi-isc-gateway/src/main/java/com/ruoyi/gateway/filter/CustomerGlobalFilter.java index 8e7bfbe61..f1ab64976 100644 --- a/ruoyi-extend/ruoyi-isc-gateway/src/main/java/com/ruoyi/gateway/filter/CustomerGlobalFilter.java +++ b/ruoyi-extend/ruoyi-isc-gateway/src/main/java/com/ruoyi/gateway/filter/CustomerGlobalFilter.java @@ -97,7 +97,7 @@ public class CustomerGlobalFilter implements GlobalFilter, Ordered { } else if (MediaType.APPLICATION_FORM_URLENCODED.equals(mediaType)) { return handlePostRequestFormUrlencoded(exchange, route, request, accessKeyName, headerAk, body); } - throw new ContentTypeNotSupportedException(); + return Mono.error(ContentTypeNotSupportedException::new); }); return GatewayUtils.modifyBody(exchange, chain, modifiedBody); } @@ -312,7 +312,7 @@ public class CustomerGlobalFilter implements GlobalFilter, Ordered { } setResponseStatus(exchange, HttpStatus.TOO_MANY_REQUESTS); exchange.getResponse().setComplete(); - throw new RateLimitException(limit.intValue(), 1, timeUnit); + return Mono.error(new RateLimitException(limit.intValue(), 1, timeUnit)); }); } }