catch multilingualHeader exception
This commit is contained in:
@ -55,9 +55,14 @@ public class GlobalReturnHandler implements ResponseBodyAdvice<Object> {
|
|||||||
} else {
|
} else {
|
||||||
result = new TimiResponse<>(TimiCode.SUCCESS, body);
|
result = new TimiResponse<>(TimiCode.SUCCESS, body);
|
||||||
}
|
}
|
||||||
if (multilingualHeader != null && TimiJava.isNotEmpty(result.getMsgKey())) {
|
try {
|
||||||
result.setMsg(multilingualHeader.handler(result));
|
if (multilingualHeader != null && TimiJava.isNotEmpty(result.getMsgKey())) {
|
||||||
} else if (TimiJava.isEmpty(result.getMsg())) {
|
result.setMsg(multilingualHeader.handler(result));
|
||||||
|
} else if (TimiJava.isEmpty(result.getMsg())) {
|
||||||
|
result.setMsg(TimiCode.fromCode(result.getCode()).toString());
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("multilingual response error", e);
|
||||||
result.setMsg(TimiCode.fromCode(result.getCode()).toString());
|
result.setMsg(TimiCode.fromCode(result.getCode()).toString());
|
||||||
}
|
}
|
||||||
if (30000 < result.getCode()) {
|
if (30000 < result.getCode()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user