Skip to content

feat: Return application level errors as a part of the gRPC response #462

@erezrokah

Description

@erezrokah

TLDR: We should consider having application level errors as a part of the gRPC responses, to make it easier to identify them.

For example in the following line:

return fmt.Errorf("failed to CloseAndRecv client: %w", err)

failed to CloseAndRecv is not necessarily correct, as err is whatever is returned from the following function:
func (s *DestinationServer) Write2(msg pb.Destination_Write2Server) error {
.

Not sure what's the best solution (need to do some research), but we could add an error(s) field to gRPC responses so we have a clear separation between application level errors and gRPC/communication level ones.

Also due to grpc/grpc-go#2934 we can't unwrap errors.

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