diff --git a/sa-token-doc/fun/exception-code.md b/sa-token-doc/fun/exception-code.md index 887df9d2..2c083f40 100644 --- a/sa-token-doc/fun/exception-code.md +++ b/sa-token-doc/fun/exception-code.md @@ -13,7 +13,7 @@ Sa-Token 中的基础异常类是 `SaTokenException`,在此基础上,又针 ``` java if(SaFoxUtil.isUrl(url) == false) { - throw new SaSsoException("无效redirect:" + url).setCode(SaSsoExceptionCode.CODE_20001); + throw new SaSsoException("无效redirect:" + url).setCode(SaSsoErrorCode.CODE_30001); } ``` @@ -28,13 +28,13 @@ public class GlobalExceptionHandler { public SaResult handlerSaTokenException(SaTokenException e) { // 根据不同异常细分状态码返回不同的提示 - if(e.getCode() == 20001) { + if(e.getCode() == 30001) { return SaResult.error("redirect 重定向 url 是一个无效地址"); } - if(e.getCode() == 20002) { + if(e.getCode() == 30002) { return SaResult.error("redirect 重定向 url 不在 allowUrl 允许的范围内"); } - if(e.getCode() == 20004) { + if(e.getCode() == 30004) { return SaResult.error("提供的 ticket 是无效的"); } // 更多 code 码判断 ...