new
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user