Skip to content

Clearer error reporting from request handlers #75

Open

Description

@brandoniles

Throwing exceptions "across the wire" is probably not the best error reporting strategy, but it would be nice to have some cleaner answer for this.

Right now the client handler code needs to do something like:

if (value == null) {
    err = new NotFoundError(key);
}
return new Response.Builder<>(new KeyValue.getValue_result(value, err), request.getEndpoint(), ResponseCode.OK) ...

Clients have to set the response code in parallel to the error in the response. It's also unclear whether the value is transmitted along with err when err is non-null (I think it's not). Some applications may have a partial response that can be used in addition to the reported error.

Activity

  1. changed the title [-]Allow request handlers to throw thrift exceptions[/-] [+]Clearer error reporting from request handlers[/+] on Sep 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions