修改配置异常提示信息
This commit is contained in:
@@ -72,7 +72,11 @@ public class ControlPolicyController extends BaseController{
|
||||
addMessage(redirectAttributes,"success","save_success");
|
||||
}catch(Exception e){
|
||||
logger.error("信息保存失败",e);
|
||||
addMessage(redirectAttributes,"save_failed");
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,"error", "request_service_failed");
|
||||
}else {
|
||||
addMessage(redirectAttributes,"error","save_failed");
|
||||
}
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/proxy/control/httpReqReplace/list?functionId="+cfg.getFunctionId();
|
||||
@@ -144,7 +148,11 @@ public class ControlPolicyController extends BaseController{
|
||||
addMessage(redirectAttributes,"success","save_success");
|
||||
}catch(Exception e){
|
||||
logger.error("信息保存失败",e);
|
||||
addMessage(redirectAttributes,"save_failed");
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,"error", "request_service_failed");
|
||||
}else {
|
||||
addMessage(redirectAttributes,"error","save_failed");
|
||||
}
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/proxy/control/httpResReplace/list?functionId="+cfg.getFunctionId();
|
||||
@@ -167,10 +175,14 @@ public class ControlPolicyController extends BaseController{
|
||||
for(String id :idArray){
|
||||
try {
|
||||
controlPolicyService.audit(isAudit,isValid,functionId,id,auditTime,Constants.REPLACE_RES_KEY_VALUE);
|
||||
} catch (MaatConvertException e) {
|
||||
} catch ( Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("配置下发失败",e);
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,"error", "request_service_failed");
|
||||
}else {
|
||||
addMessage(redirectAttributes,"error","audit_failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -286,7 +286,12 @@ public class PxyObjKeyringController extends BaseController {
|
||||
} catch (MaatConvertException e) {
|
||||
addMessage(redirectAttributes,"error", "request_service_failed");
|
||||
}catch (Exception e) {
|
||||
addMessage(redirectAttributes,"error", "audit_failed");
|
||||
logger.error("pxyObjkeyring error:"+e);
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,"error", "request_service_failed");
|
||||
}else {
|
||||
addMessage(redirectAttributes,"error","audit_failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user