yl-yue opened a new issue #9342:
URL: https://github.com/apache/dubbo/issues/9342
## tri协议,中文异常乱码
Filter中抛出错误:
```java
throw new BusinessException("错误的token");
```
得到结果:中文乱码
```json
{
"error": "13 INTERNAL: Exception in invoker chain :???token"
}
```
## tri协议,在异常中加入无意义内容(`Exception in invoker chain :`),导致前端不方便提示异常
```java
public abstract class AbstractServerStream extends AbstractStream implements
Stream {
public void execute(Runnable runnable) {
try {
super.execute(() -> {
try {
runnable.run();
} catch (Throwable t) {
LOGGER.error("Exception processing triple message", t);
transportError(GrpcStatus.fromCode(GrpcStatus.Code.INTERNAL)
.withDescription("Exception in invoker chain :" +
t.getMessage())
.withCause(t));
}
});
} catch (RejectedExecutionException e) {
LOGGER.error("Provider's thread pool is full", e);
transportError(GrpcStatus.fromCode(GrpcStatus.Code.RESOURCE_EXHAUSTED)
.withDescription("Provider's thread pool is full"));
} catch (Throwable t) {
LOGGER.error("Provider submit request to thread pool error ", t);
transportError(GrpcStatus.fromCode(GrpcStatus.Code.INTERNAL)
.withCause(t)
.withDescription("Provider's error"));
}
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]