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