dromara / dromara/forest

dubbo服务中,内部异常ForestNetworkException会直接导致序列化崩溃

Open
#112 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.9k
Forks
241
PR merge metrics
No merged PRs in 30d

Description

```
java.lang.RuntimeException: Serialized class com.dtflys.forest.backend.okhttp3.response.OkHttp3ForestResponse must implement java.io.Serializable
Java field: private com.dtflys.forest.http.ForestResponse com.dtflys.forest.exceptions.ForestNetworkException.response
Java field: private java.lang.Throwable java.lang.Throwable.cause
```
原因是`ForestNetworkException`类有一个字段`ForestResponse`, 而`ForestResponse`没有实现`Serializable`接口

```java
public class ForestNetworkException extends ForestRuntimeException {

private Integer statusCode;

private ForestResponse response;

public ForestNetworkException(String message, Integer statusCode, ForestResponse response) {
super(errorMessage(message, statusCode, response));
this.statusCode = statusCode;
this.response = response;
}
// ...some other...
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.