radicle-dev / radicle-upstream

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

Improve opening patches custom protocol handling #2823

Closed rudolfs closed 2 years ago

rudolfs commented 2 years ago

When a user clicks on a custom protocol link that opens a patch in Upstream, but the patch hasn't been replicated yet, we get an

error message. ``` { "stack": "Error: Failed to fetch patch\n at f (file:///Applications/Radicle%20Upstream.app/Contents/Resources/app.asar/public/bundle.js:67:298542)", "message": "Failed to fetch patch", "source": { "stack": "Error: Patch not found\n at file:///Applications/Radicle%20Upstream.app/Contents/Resources/app.asar/public/bundle.js:67:298440\n at async file:///Applications/Radicle%20Upstream.app/Contents/Resources/app.asar/public/bundle.js:67:298347\n at async f (file:///Applications/Radicle%20Upstream.app/Contents/Resources/app.asar/public/bundle.js:67:298325)", "message": "Patch not found", "code": "UnknownException", "details": { "name": "Error" } } } ```

It would be nicer if we could do this instead:

rudolfs commented 2 years ago

Fixed via: https://github.com/radicle-dev/radicle-upstream/commit/c4fa7c921e10dfca50c5e5a61ed02d6fa409781c https://github.com/radicle-dev/radicle-upstream/commit/aee1f1c909e6ddb038aca8b456e28e015045f303