-
Notifications
You must be signed in to change notification settings - Fork 905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: java-client can not get error message when go-server return error #68
Comments
We can discuss in here. @fangyincheng @wongoo |
related issue: https://github.com/dubbogo/hessian2/issues/53 |
Can we convert error in Go to exception in Java instead of Golang developers have to register a java pojo 'Exception' . ? I think both error in Go & Exception in Java is basic type . |
Now, I think there are two ways:
What do you think? |
Maybe we can do both. User can define the java exception POJO in go and register it. Also we can provide some standard POJOs of java exception that are often used instead of all of them. If Hessian2 finds neither the standard POJO corresponding to exception nor the user-defined-registered one, then Hessian2 can decode exception as |
add: tls sample
My code is as follows
go-server
![image](https://user-images.githubusercontent.com/21357605/58855769-71624d80-86d3-11e9-98de-da8a5f2c5940.png)
java-client
![image](https://user-images.githubusercontent.com/21357605/58855859-b1c1cb80-86d3-11e9-885e-40e6e06918a4.png)
The problem is that exception java catched is not contain the go error message which should be ‘invalid params: uid, name, cert could not be empty’.
In fact, java-client always catch as follows:
Failed to invoke the method Init in the service com.xxx.service.go.base.certify.api.CertifyService. Tried 1 times of the providers [10.71.8.70:20001] (1/1) from the registry 10.71.8.70:2181 on the consumer 10.71.8.70 using the dubbo version 2.6.3. Last error is: Failed to invoke remote method: Init, provider: dubbo://10.71.8.70:20001/com.xxx.service.go.base.certify.api.CertifyService?anyhost=true&app.version=1.0&application=consumer-of-certify-app&category=providers&check=false&cluster=failover&dubbo=dubbo-provider-golang-2.6.0&environment=dev&group=&interface=com.xxx.service.go.base.certify.api.CertifyService&ip=192.168.99.1&loadbalance=random&methods=Init&methods.Init.loadbalance=random&methods.Init.retries=3&methods.Init.weight=0&module=dubbogo+certify+server&name=CertifyService&organization=test.com&owner=raychen&pid=71023®ister.ip=10.71.8.70&remote.timestamp=1559621785&retries=0&service.filter=echo&side=consumer×tamp=1559622450690&version=&warmup=100, cause: 0
The text was updated successfully, but these errors were encountered: