From 6f16a23cd9a6468d5b8c19c2f5f5eeb9e3534895 Mon Sep 17 00:00:00 2001 From: shanj <18996038927@163.com> Date: Sun, 4 Jun 2023 22:54:31 +0800 Subject: [PATCH] =?UTF-8?q?=20=E6=8E=A5=E5=8F=A3=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E6=8F=90=E7=A4=BA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Middlewares/ClientVersionValidationMiddleWare.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BBWYB.Server.API/Middlewares/ClientVersionValidationMiddleWare.cs b/BBWYB.Server.API/Middlewares/ClientVersionValidationMiddleWare.cs index cdd75c1..42e3bba 100644 --- a/BBWYB.Server.API/Middlewares/ClientVersionValidationMiddleWare.cs +++ b/BBWYB.Server.API/Middlewares/ClientVersionValidationMiddleWare.cs @@ -31,11 +31,11 @@ namespace BBWYB.Server.API.Middlewares if (apiRequirement != null) { if (!context.Request.Headers.TryGetValue("ClientVersion", out StringValues clientVersionStr)) - throw new BusinessException("未读取到ClientVersion"); + throw new BusinessException("缺少版本信息,请更新步步为盈"); if (!int.TryParse(clientVersionStr, out int clientVersion)) - throw new BusinessException("非法ClientVersion"); + throw new BusinessException("版本信息不正确,请更新步步为盈"); if (clientVersion < apiRequirement.MinimumVersion) - throw new BusinessException("当前ClientVersion低于接口最低要求,请升级到最新版"); + throw new BusinessException("当前请求需更新步步为盈~!"); } await _next(context); //调用管道执行下一个中间件 }