mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-29 10:10:30 +08:00
Catch Seed class construction errors
Signed-off-by: Sebastian Martinez <sebastinez@me.com> Signed-off-by: Alexis Sellier <self@cloudhead.io>
This commit is contained in:
@@ -41,13 +41,15 @@
|
||||
}).then(async (result) => {
|
||||
const profile = result?.profile;
|
||||
const seedInstance = profile?.seed ?? result?.seed;
|
||||
const cfg = seedInstance ? config.withSeed(seedInstance) : config;
|
||||
const cfg = seedInstance && seedInstance.valid ? config.withSeed(seedInstance) : config;
|
||||
const info = await proj.getInfo(urn, cfg);
|
||||
projectInfo = info;
|
||||
const anchors = await getAllAnchors(config, urn, profile?.anchorsAccount ?? org);
|
||||
|
||||
let branches = Array([info.meta.defaultBranch, info.head]) as [string, string][];
|
||||
let peers: proj.Peer[] = [];
|
||||
|
||||
projectInfo = info;
|
||||
|
||||
// Checks for delegates returned from seed node, as feature check of the seed node
|
||||
if (info.meta.delegates) {
|
||||
// Check for selected peer to override available branches.
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
state = { status: Status.Loaded };
|
||||
info = result;
|
||||
} catch (err: any) {
|
||||
console.error(err.message);
|
||||
console.debug(err);
|
||||
state = { status: Status.Error, error: err.message };
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user