Radish alpha
r
rad:z39mP9rQAaGmERfUMPULfPUi473tY
Radicle terminal user interface
Radicle
Git
Replace optional error variant in return types
Merged did:key:z6MkwcUR...q1kL opened 8 months ago

This patch replaces the Result<_, Optionanyhow::Error> with a proper error.

This simplifies the setup code a bit. The only changed behaviour is that when rad does not exit successfully, an error is returned instead of Some(error), which does not alter the behaviour of this binary, because it would exit the process anyways, but now “rad binary failed” is printed as well.

did:key:z6MkwcUR...q1kL opened with revision f439f78f on base a2de36dd +11 -17 8 months ago

This patch replaces the Result<_, Optionanyhow::Error> with a proper error.

This simplifies the setup code a bit. The only changed behaviour is that when rad does not exit successfully, an error is returned instead of Some(error), which does not alter the behaviour of this binary, because it would exit the process anyways, but now “rad binary failed” is printed as well.

did:key:z6MkgFq6...nBGz pushed revision 2 777a2f17 on base a2de36dd +43 -27 8 months ago

Introduce proper error types and bring back old behaviour.

did:key:z6MkgFq6...nBGz reviewed 8 months ago

Thanks for the contribution! Although I’m in favor of improving the error handling, I’m still not convinced by the additional error message that is now printed:

❯ cargo run -q remote show
✗ Error: rad remote: unknown operation 'show'
✗ Error: rad-tui: rad binary failed

The goal of having the optional error was to not print that error message. I think if rad-tui is meant to act as a drop-in replacement, it should only print the error that was returned from rad.

But still, improving semantics here would be good. So I took the chance to advance your changes and introduce proper error types in a new revision.

did:key:z6MkgFq6...nBGz pushed revision 3 5006f434 on base a2de36dd +43 -27 8 months ago

Improves error names

did:key:z6MkgFq6...nBGz pushed revision 4 12c1e091 on base a2de36dd +43 -27 8 months ago

Fixed sign-off.

did:key:z6MkgFq6...nBGz merged revision 12c1e091 at 7a1ba859 8 months ago