tonic icon indicating copy to clipboard operation
tonic copied to clipboard

Return a Result type from the PersistentChannel instead of unwrapping.

Open nathanielford opened this issue 4 months ago • 0 comments

Currently the PersistentChannel constructor panics if the URL cannot be parsed. This adds a check for a parse error and returns a corresponding Status::INVALID_ARGUMENT if the parse failed. Using the Status struct should be conformant with the C++ implementation and the current tonic implementation.

Motivation

Standardize error handling, handle a TODO.

Solution

Using a Result object to return. The Status code is to conform with the gRPC spec

nathanielford avatar Dec 08 '25 23:12 nathanielford