radicle-dev / radicle-upstream

Desktop client for Radicle.
Other
616 stars 51 forks source link

Improve project checkout error messages #767

Closed rudolfs closed 4 years ago

rudolfs commented 4 years ago

Propagate the actual reason why a checkout failed from the remote helper subcommand to the UI.

Currently the user just sees this:

err

Where the real error is this:

Cloning into '/Users/rudolfs/work/radicle-checkout/rx'...
Error: Signer key does not match key used at initialisation

Stack backtrace:
   0: std::backtrace::Backtrace::create
   1: std::backtrace::Backtrace::capture
   2: anyhow::error::<impl core::convert::From<E> for anyhow::Error>::from
   3: radicle_git_helpers::remote_helper::run
   4: git_remote_rad::main
   5: std::rt::lang_start::{{closure}}
   6: std::rt::lang_start_internal
   7: std::rt::lang_start
   8: main
 ERROR warp::filters::body   > request body already taken in previous filter
 ERROR proxy::http::error    > Rejection([MethodNotAllowed, BodyConsumedMultipleTimes, Checkout, MethodNotAllowed])

Follow up on: https://github.com/radicle-dev/radicle-upstream/pull/722#discussion_r468013691

rudolfs commented 4 years ago

We're not using the git-remote-rad helper under the hood anymore for checkouts. Also the notifications seem to be proper.

Screenshot 2020-09-22 at 10 54 58 Screenshot 2020-09-22 at 10 55 23