Skip to content

Streamline creation of GRPC Exceptions #2502

@daschl

Description

@daschl

At the moment, a GRPC exception can be created as

// Without Description
throw new GrpcStatusException(GrpcStatusCode.PERMISSION_DENIED.status());

// With Description
throw new GrpcStatusException(new GrpcStatus(GrpcStatusCode.PERMISSION_DENIED, "my-description"));

Other GRPC implementations provide convenience methods like:

throw PERMISSION_DENIED.withDescription("denied!").asException();

We could potentially add something similar to streamline exception generation (also including withCause, etc).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions