Skip to content

Should Request Handler set ResponseCode? #174

@siddjain

Description

@siddjain

This is more of a question than an issue but I couldn't find another place to ask so asking it as an issue.

My question is that should a request handler be ever setting the ResponseCode?
https://github.com/uber/tchannel-java/blob/master/tchannel-core/src/main/java/com/uber/tchannel/api/ResponseCode.java

I looked at following two request handlers:
https://github.com/uber/tchannel-java/blob/master/tchannel-example/src/main/java/com/uber/tchannel/thrift/GetValueRequestHandler.java
https://github.com/uber/tchannel-java/blob/master/tchannel-example/src/main/java/com/uber/tchannel/thrift/SetValueRequestHandler.java

and notice that they do not set the ResponseCode. It seems to make sense. I suspect the ResponseCode is something that is set by tchannel (in case of an uncaught exception or network error) but just want to confirm.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions