You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2020/03/03 10:11:05 UTC
[GitHub] [servicecomb-java-chassis] heyile commented on issue #1610: ServiceComb在RPC调用时如果业务请求报错了怎么样才能拿到请求报错的InvocationContext ?
heyile commented on issue #1610: ServiceComb在RPC调用时如果业务请求报错了怎么样才能拿到请求报错的InvocationContext ?
URL: https://github.com/apache/servicecomb-java-chassis/issues/1610#issuecomment-593870439
可以.
```java
public String sayHi(String name) {
InvocationContext context = ContextUtils.getInvocationContext();
context.setStatus(402);
return "Hello " + name;
}
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services