Skip to content

Commit 9b3eb7e

Browse files
committed
refactor: let settle() handle getChiaVersion errors for observability
Remove the internal try/catch so RPC failures surface in the settle() debug log, consistent with every other wallet RPC function.
1 parent acd031f commit 9b3eb7e

1 file changed

Lines changed: 10 additions & 14 deletions

File tree

src/datalayer/wallet.js

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -333,22 +333,18 @@ const getChiaVersion = async () => {
333333
const url = `${rpcUrl}/get_version`;
334334
const { cert, key, timeout } = getBaseOptions();
335335

336-
try {
337-
const response = await superagent
338-
.post(url)
339-
.key(key)
340-
.cert(cert)
341-
.timeout(timeout)
342-
.send(JSON.stringify({}));
336+
const response = await superagent
337+
.post(url)
338+
.key(key)
339+
.cert(cert)
340+
.timeout(timeout)
341+
.send(JSON.stringify({}));
343342

344-
const data = response.body;
345-
if (data.success) {
346-
return data.version || null;
347-
}
348-
return null;
349-
} catch {
350-
return null;
343+
const data = response.body;
344+
if (data.success) {
345+
return data.version || null;
351346
}
347+
return null;
352348
};
353349

354350
/**

0 commit comments

Comments
 (0)