This commit is contained in:
Administrator
2024-05-12 23:02:22 +08:00
parent 0d6a0544fa
commit ad25734329

View File

@@ -1,7 +1,7 @@
package com.demo.gateway.exception;
import com.alibaba.fastjson.JSONObject;
import com.demo.excepiton.RSAException;
import com.demo.gateway.utils.AESUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.http.HttpStatus;
@@ -11,7 +11,7 @@ public abstract class AbstractExceptionHandler {
protected JSONObject buildErrorMap(Throwable ex) {
JSONObject json = new JSONObject();
if (ex instanceof RSAException || ex instanceof IllegalArgumentException) {
if ( ex instanceof IllegalArgumentException) {
json.put("code", HttpStatus.BAD_REQUEST.value());
if (StringUtils.isNotBlank(ex.getMessage())){
json.put("msg", ex.getMessage());